create-vue 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/base/package.json +7 -6
- package/template/base/vite.config.js +6 -1
- package/template/config/typescript/env.d.ts +1 -15
- package/template/config/typescript/package.json +2 -2
- package/template/entry/default/src/main.js +4 -4
- package/template/entry/pinia/src/main.js +5 -5
- package/template/entry/router/src/main.js +4 -4
- package/template/entry/router-and-pinia/src/main.js +5 -5
package/package.json
CHANGED
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
"preview": "vite preview --port 5050"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@vue/composition-api": "^1.4.
|
|
8
|
+
"@vue/composition-api": "^1.4.6",
|
|
9
9
|
"vue": "^2.6.14"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@vitejs/plugin-legacy": "^1.
|
|
13
|
-
"@vue/runtime-dom": "^3.2.
|
|
14
|
-
"unplugin-vue2-script-setup": "^0.
|
|
15
|
-
"vite": "^2.
|
|
16
|
-
"vite-plugin-vue2": "^1.9.
|
|
12
|
+
"@vitejs/plugin-legacy": "^1.7.1",
|
|
13
|
+
"@vue/runtime-dom": "^3.2.31",
|
|
14
|
+
"unplugin-vue2-script-setup": "^0.9.3",
|
|
15
|
+
"vite": "^2.8.3",
|
|
16
|
+
"vite-plugin-vue2": "^1.9.3",
|
|
17
|
+
"vue-template-babel-compiler": "1.1.3",
|
|
17
18
|
"vue-template-compiler": "^2.6.14"
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -3,13 +3,18 @@ import { fileURLToPath } from 'url'
|
|
|
3
3
|
import { defineConfig } from 'vite'
|
|
4
4
|
import legacy from '@vitejs/plugin-legacy'
|
|
5
5
|
import { createVuePlugin as vue2 } from 'vite-plugin-vue2'
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import vueTemplateBabelCompiler from 'vue-template-babel-compiler'
|
|
6
8
|
import scriptSetup from 'unplugin-vue2-script-setup/vite'
|
|
7
9
|
|
|
8
10
|
// https://vitejs.dev/config/
|
|
9
11
|
export default defineConfig({
|
|
10
12
|
plugins: [
|
|
11
13
|
vue2({
|
|
12
|
-
jsx: true
|
|
14
|
+
jsx: true,
|
|
15
|
+
vueTemplateOptions: {
|
|
16
|
+
compiler: vueTemplateBabelCompiler
|
|
17
|
+
}
|
|
13
18
|
}),
|
|
14
19
|
scriptSetup(),
|
|
15
20
|
legacy({
|
|
@@ -1,16 +1,2 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module '*.vue' {
|
|
4
|
-
import Vue from 'vue'
|
|
5
|
-
export default Vue
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare global {
|
|
9
|
-
namespace JSX {
|
|
10
|
-
interface Element extends VNode {}
|
|
11
|
-
interface ElementClass extends Vue {}
|
|
12
|
-
interface IntrinsicElements {
|
|
13
|
-
[elem: string]: any
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
2
|
+
/// <reference types="unplugin-vue2-script-setup/shims" />
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI from '@vue/composition-api'
|
|
2
|
+
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
3
|
|
|
4
4
|
import App from './App.vue'
|
|
5
5
|
|
|
6
6
|
Vue.use(VueCompositionAPI)
|
|
7
7
|
|
|
8
|
-
const app =
|
|
9
|
-
render: (
|
|
8
|
+
const app = createApp({
|
|
9
|
+
render: () => h(App)
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
-
app
|
|
12
|
+
app.mount('#app')
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI from '@vue/composition-api'
|
|
2
|
+
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
3
|
import { createPinia, PiniaVuePlugin } from 'pinia'
|
|
4
4
|
|
|
5
5
|
import App from './App.vue'
|
|
6
6
|
|
|
7
7
|
Vue.use(VueCompositionAPI)
|
|
8
|
-
Vue.use(PiniaVuePlugin)
|
|
9
8
|
|
|
10
|
-
const app =
|
|
9
|
+
const app = createApp({
|
|
11
10
|
pinia: createPinia(),
|
|
12
|
-
render: (
|
|
11
|
+
render: () => h(App)
|
|
13
12
|
})
|
|
13
|
+
app.use(PiniaVuePlugin)
|
|
14
14
|
|
|
15
|
-
app
|
|
15
|
+
app.mount('#app')
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI from '@vue/composition-api'
|
|
2
|
+
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
3
|
|
|
4
4
|
import App from './App.vue'
|
|
5
5
|
import router from './router'
|
|
6
6
|
|
|
7
7
|
Vue.use(VueCompositionAPI)
|
|
8
8
|
|
|
9
|
-
const app =
|
|
9
|
+
const app = createApp({
|
|
10
10
|
router,
|
|
11
|
-
render: (
|
|
11
|
+
render: () => h(App)
|
|
12
12
|
})
|
|
13
13
|
|
|
14
|
-
app
|
|
14
|
+
app.mount('#app')
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI from '@vue/composition-api'
|
|
2
|
+
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
3
|
import { createPinia, PiniaVuePlugin } from 'pinia'
|
|
4
4
|
|
|
5
5
|
import App from './App.vue'
|
|
6
6
|
import router from './router'
|
|
7
7
|
|
|
8
8
|
Vue.use(VueCompositionAPI)
|
|
9
|
-
Vue.use(PiniaVuePlugin)
|
|
10
9
|
|
|
11
|
-
const app =
|
|
10
|
+
const app = createApp({
|
|
12
11
|
router,
|
|
13
12
|
pinia: createPinia(),
|
|
14
|
-
render: (
|
|
13
|
+
render: () => h(App)
|
|
15
14
|
})
|
|
15
|
+
app.use(PiniaVuePlugin)
|
|
16
16
|
|
|
17
|
-
app
|
|
17
|
+
app.mount('#app')
|