mirror of
https://github.com/lstoeferle/vite-vue2-starter
synced 2025-02-23 13:12:18 +08:00
Added missing type declarations and changed vue init
This commit is contained in:
parent
9618c30b9c
commit
2663ce4a6e
12
src/main.ts
12
src/main.ts
@ -1,14 +1,16 @@
|
||||
import Vue from "vue";
|
||||
import App from "@/App.vue";
|
||||
import VueCompositionApi from "@vue/composition-api";
|
||||
import VueCompositionApi, { createApp, h } from "@vue/composition-api";
|
||||
|
||||
Vue.use(VueCompositionApi)
|
||||
Vue.use(VueCompositionApi);
|
||||
|
||||
import "windi.css";
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
Vue.config.devtools = true;
|
||||
|
||||
new Vue({
|
||||
render: (h) => h(App),
|
||||
}).$mount("#app");
|
||||
const app = createApp({
|
||||
render: () => h(App),
|
||||
});
|
||||
|
||||
app.mount("#app");
|
||||
|
13
src/shims-tsx.d.ts
vendored
Normal file
13
src/shims-tsx.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import Vue, { VNode } from "vue";
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// tslint:disable no-empty-interface
|
||||
interface Element extends VNode {}
|
||||
// tslint:disable no-empty-interface
|
||||
interface ElementClass extends Vue {}
|
||||
interface IntrinsicElements {
|
||||
[elem: string]: any;
|
||||
}
|
||||
}
|
||||
}
|
4
src/shims-vue.d.ts
vendored
Normal file
4
src/shims-vue.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module "*.vue" {
|
||||
import Vue from "vue";
|
||||
export default Vue;
|
||||
}
|
Loading…
Reference in New Issue
Block a user