create-vue 2.0.0 → 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/code/default/src/components/HelloWorld.vue +1 -1
- package/template/code/default/src/components/TheWelcome.vue +4 -4
- package/template/code/router/src/components/HelloWorld.vue +1 -1
- package/template/code/router/src/components/TheWelcome.vue +4 -4
- package/template/code/typescript-default/src/components/HelloWorld.vue +1 -1
- package/template/code/typescript-default/src/components/TheWelcome.vue +4 -4
- package/template/code/typescript-router/src/components/HelloWorld.vue +1 -1
- package/template/code/typescript-router/src/components/TheWelcome.vue +4 -4
- 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({
|
|
@@ -13,7 +13,7 @@ defineProps({
|
|
|
13
13
|
<h3>
|
|
14
14
|
You’ve successfully created a project with
|
|
15
15
|
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
|
|
16
|
-
<a target="_blank" href="https://vuejs.org/">Vue 2</a>.
|
|
16
|
+
<a target="_blank" href="https://v2.vuejs.org/">Vue 2</a>.
|
|
17
17
|
</h3>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
@@ -16,7 +16,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
16
16
|
<template #heading>Documentation</template>
|
|
17
17
|
|
|
18
18
|
Vue’s
|
|
19
|
-
<a target="_blank" href="https://
|
|
19
|
+
<a target="_blank" href="https://v2.vuejs.org/">official documentation</a>
|
|
20
20
|
provides you with all information you need to get started.
|
|
21
21
|
</WelcomeItem>
|
|
22
22
|
|
|
@@ -48,8 +48,8 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
48
48
|
<template #heading>Ecosystem</template>
|
|
49
49
|
|
|
50
50
|
Get official tools and libraries for your project:
|
|
51
|
-
<a target="_blank" href="https://
|
|
52
|
-
<a target="_blank" href="https://router.vuejs.org/">Vue Router</a>,
|
|
51
|
+
<a target="_blank" href="https://pinia.vuejs.org/">Pinia</a>,
|
|
52
|
+
<a target="_blank" href="https://v3.router.vuejs.org/">Vue Router</a>,
|
|
53
53
|
<a target="_blank" href="https://vue-test-utils.vuejs.org/">Vue Test Utils</a>, and
|
|
54
54
|
<a target="_blank" href="https://github.com/vuejs/devtools">Vue Dev Tools</a>. If you need
|
|
55
55
|
more resources, we suggest paying
|
|
@@ -80,7 +80,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
80
80
|
|
|
81
81
|
As an independent project, Vue relies on community backing for its sustainability. You can
|
|
82
82
|
help us by
|
|
83
|
-
<a target="_blank" href="https://vuejs.org/
|
|
83
|
+
<a target="_blank" href="https://vuejs.org/sponsor/">becoming a sponsor</a>.
|
|
84
84
|
</WelcomeItem>
|
|
85
85
|
</div>
|
|
86
86
|
</template>
|
|
@@ -13,7 +13,7 @@ defineProps({
|
|
|
13
13
|
<h3>
|
|
14
14
|
You’ve successfully created a project with
|
|
15
15
|
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
|
|
16
|
-
<a target="_blank" href="https://vuejs.org/">Vue 2</a>.
|
|
16
|
+
<a target="_blank" href="https://v2.vuejs.org/">Vue 2</a>.
|
|
17
17
|
</h3>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
@@ -16,7 +16,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
16
16
|
<template #heading>Documentation</template>
|
|
17
17
|
|
|
18
18
|
Vue’s
|
|
19
|
-
<a target="_blank" href="https://
|
|
19
|
+
<a target="_blank" href="https://v2.vuejs.org/">official documentation</a>
|
|
20
20
|
provides you with all information you need to get started.
|
|
21
21
|
</WelcomeItem>
|
|
22
22
|
|
|
@@ -48,8 +48,8 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
48
48
|
<template #heading>Ecosystem</template>
|
|
49
49
|
|
|
50
50
|
Get official tools and libraries for your project:
|
|
51
|
-
<a target="_blank" href="https://
|
|
52
|
-
<a target="_blank" href="https://router.vuejs.org/">Vue Router</a>,
|
|
51
|
+
<a target="_blank" href="https://pinia.vuejs.org/">Pinia</a>,
|
|
52
|
+
<a target="_blank" href="https://v3.router.vuejs.org/">Vue Router</a>,
|
|
53
53
|
<a target="_blank" href="https://vue-test-utils.vuejs.org/">Vue Test Utils</a>, and
|
|
54
54
|
<a target="_blank" href="https://github.com/vuejs/devtools">Vue Dev Tools</a>. If you need
|
|
55
55
|
more resources, we suggest paying
|
|
@@ -80,7 +80,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
80
80
|
|
|
81
81
|
As an independent project, Vue relies on community backing for its sustainability. You can
|
|
82
82
|
help us by
|
|
83
|
-
<a target="_blank" href="https://vuejs.org/
|
|
83
|
+
<a target="_blank" href="https://vuejs.org/sponsor/">becoming a sponsor</a>.
|
|
84
84
|
</WelcomeItem>
|
|
85
85
|
</div>
|
|
86
86
|
</template>
|
|
@@ -10,7 +10,7 @@ defineProps<{
|
|
|
10
10
|
<h3>
|
|
11
11
|
You’ve successfully created a project with
|
|
12
12
|
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
|
|
13
|
-
<a target="_blank" href="https://vuejs.org/">Vue 2</a>.
|
|
13
|
+
<a target="_blank" href="https://v2.vuejs.org/">Vue 2</a>.
|
|
14
14
|
</h3>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -16,7 +16,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
16
16
|
<template #heading>Documentation</template>
|
|
17
17
|
|
|
18
18
|
Vue’s
|
|
19
|
-
<a target="_blank" href="https://
|
|
19
|
+
<a target="_blank" href="https://v2.vuejs.org/">official documentation</a>
|
|
20
20
|
provides you with all information you need to get started.
|
|
21
21
|
</WelcomeItem>
|
|
22
22
|
|
|
@@ -48,8 +48,8 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
48
48
|
<template #heading>Ecosystem</template>
|
|
49
49
|
|
|
50
50
|
Get official tools and libraries for your project:
|
|
51
|
-
<a target="_blank" href="https://
|
|
52
|
-
<a target="_blank" href="https://router.vuejs.org/">Vue Router</a>,
|
|
51
|
+
<a target="_blank" href="https://pinia.vuejs.org/">Pinia</a>,
|
|
52
|
+
<a target="_blank" href="https://v3.router.vuejs.org/">Vue Router</a>,
|
|
53
53
|
<a target="_blank" href="https://vue-test-utils.vuejs.org/">Vue Test Utils</a>, and
|
|
54
54
|
<a target="_blank" href="https://github.com/vuejs/devtools">Vue Dev Tools</a>. If you need
|
|
55
55
|
more resources, we suggest paying
|
|
@@ -80,7 +80,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
80
80
|
|
|
81
81
|
As an independent project, Vue relies on community backing for its sustainability. You can
|
|
82
82
|
help us by
|
|
83
|
-
<a target="_blank" href="https://vuejs.org/
|
|
83
|
+
<a target="_blank" href="https://vuejs.org/sponsor/">becoming a sponsor</a>.
|
|
84
84
|
</WelcomeItem>
|
|
85
85
|
</div>
|
|
86
86
|
</template>
|
|
@@ -10,7 +10,7 @@ defineProps<{
|
|
|
10
10
|
<h3>
|
|
11
11
|
You’ve successfully created a project with
|
|
12
12
|
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
|
|
13
|
-
<a target="_blank" href="https://vuejs.org/">Vue 2</a>. What's next?
|
|
13
|
+
<a target="_blank" href="https://v2.vuejs.org/">Vue 2</a>. What's next?
|
|
14
14
|
</h3>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -16,7 +16,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
16
16
|
<template #heading>Documentation</template>
|
|
17
17
|
|
|
18
18
|
Vue’s
|
|
19
|
-
<a target="_blank" href="https://
|
|
19
|
+
<a target="_blank" href="https://v2.vuejs.org/">official documentation</a>
|
|
20
20
|
provides you with all information you need to get started.
|
|
21
21
|
</WelcomeItem>
|
|
22
22
|
|
|
@@ -48,8 +48,8 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
48
48
|
<template #heading>Ecosystem</template>
|
|
49
49
|
|
|
50
50
|
Get official tools and libraries for your project:
|
|
51
|
-
<a target="_blank" href="https://
|
|
52
|
-
<a target="_blank" href="https://router.vuejs.org/">Vue Router</a>,
|
|
51
|
+
<a target="_blank" href="https://pinia.vuejs.org/">Pinia</a>,
|
|
52
|
+
<a target="_blank" href="https://v3.router.vuejs.org/">Vue Router</a>,
|
|
53
53
|
<a target="_blank" href="https://vue-test-utils.vuejs.org/">Vue Test Utils</a>, and
|
|
54
54
|
<a target="_blank" href="https://github.com/vuejs/devtools">Vue Dev Tools</a>. If you need
|
|
55
55
|
more resources, we suggest paying
|
|
@@ -80,7 +80,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
80
80
|
|
|
81
81
|
As an independent project, Vue relies on community backing for its sustainability. You can
|
|
82
82
|
help us by
|
|
83
|
-
<a target="_blank" href="https://vuejs.org/
|
|
83
|
+
<a target="_blank" href="https://vuejs.org/sponsor/">becoming a sponsor</a>.
|
|
84
84
|
</WelcomeItem>
|
|
85
85
|
</div>
|
|
86
86
|
</template>
|
|
@@ -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')
|