From 3cbd6b7da7d6b4872aae1d437b90a11828b4b11f Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Tue, 22 Feb 2022 16:13:01 +0800 Subject: [PATCH] chore: update snapshot --- playground/default/README.md | 6 +++--- playground/default/package.json | 13 +++++++------ playground/default/src/main.js | 8 ++++---- playground/default/vite.config.js | 7 ++++++- playground/pinia-with-tests/README.md | 12 ++++++------ playground/pinia-with-tests/package.json | 13 +++++++------ playground/pinia-with-tests/src/main.js | 10 +++++----- playground/pinia-with-tests/vite.config.js | 7 ++++++- playground/pinia/README.md | 6 +++--- playground/pinia/package.json | 13 +++++++------ playground/pinia/src/main.js | 10 +++++----- playground/pinia/vite.config.js | 7 ++++++- playground/router-pinia-with-tests/README.md | 12 ++++++------ playground/router-pinia-with-tests/package.json | 13 +++++++------ playground/router-pinia-with-tests/src/main.js | 10 +++++----- .../router-pinia-with-tests/vite.config.js | 7 ++++++- playground/router-pinia/README.md | 6 +++--- playground/router-pinia/package.json | 13 +++++++------ playground/router-pinia/src/main.js | 10 +++++----- playground/router-pinia/vite.config.js | 7 ++++++- playground/router-with-tests/README.md | 12 ++++++------ playground/router-with-tests/package.json | 13 +++++++------ playground/router-with-tests/src/main.js | 8 ++++---- playground/router-with-tests/vite.config.js | 7 ++++++- playground/router/README.md | 6 +++--- playground/router/package.json | 13 +++++++------ playground/router/src/main.js | 8 ++++---- playground/router/vite.config.js | 7 ++++++- .../typescript-pinia-with-tests/README.md | 12 ++++++------ playground/typescript-pinia-with-tests/env.d.ts | 16 +--------------- .../typescript-pinia-with-tests/package.json | 17 +++++++++-------- .../typescript-pinia-with-tests/src/main.ts | 10 +++++----- .../typescript-pinia-with-tests/vite.config.ts | 7 ++++++- playground/typescript-pinia/README.md | 6 +++--- playground/typescript-pinia/env.d.ts | 16 +--------------- playground/typescript-pinia/package.json | 17 +++++++++-------- playground/typescript-pinia/src/main.ts | 10 +++++----- playground/typescript-pinia/vite.config.ts | 7 ++++++- .../README.md | 12 ++++++------ .../typescript-router-pinia-with-tests/env.d.ts | 16 +--------------- .../package.json | 17 +++++++++-------- .../src/main.ts | 10 +++++----- .../vite.config.ts | 7 ++++++- playground/typescript-router-pinia/README.md | 6 +++--- playground/typescript-router-pinia/env.d.ts | 16 +--------------- playground/typescript-router-pinia/package.json | 17 +++++++++-------- playground/typescript-router-pinia/src/main.ts | 10 +++++----- .../typescript-router-pinia/vite.config.ts | 7 ++++++- .../typescript-router-with-tests/README.md | 12 ++++++------ .../typescript-router-with-tests/env.d.ts | 16 +--------------- .../typescript-router-with-tests/package.json | 17 +++++++++-------- .../typescript-router-with-tests/src/main.ts | 8 ++++---- .../typescript-router-with-tests/vite.config.ts | 7 ++++++- playground/typescript-router/README.md | 6 +++--- playground/typescript-router/env.d.ts | 16 +--------------- playground/typescript-router/package.json | 17 +++++++++-------- playground/typescript-router/src/main.ts | 8 ++++---- playground/typescript-router/vite.config.ts | 7 ++++++- playground/typescript-with-tests/README.md | 12 ++++++------ playground/typescript-with-tests/env.d.ts | 16 +--------------- playground/typescript-with-tests/package.json | 17 +++++++++-------- playground/typescript-with-tests/src/main.ts | 8 ++++---- playground/typescript-with-tests/vite.config.ts | 7 ++++++- playground/typescript/README.md | 6 +++--- playground/typescript/env.d.ts | 16 +--------------- playground/typescript/package.json | 17 +++++++++-------- playground/typescript/src/main.ts | 8 ++++---- playground/typescript/vite.config.ts | 7 ++++++- playground/with-tests/README.md | 12 ++++++------ playground/with-tests/package.json | 13 +++++++------ playground/with-tests/src/main.js | 8 ++++---- playground/with-tests/vite.config.js | 7 ++++++- 72 files changed, 376 insertions(+), 392 deletions(-) diff --git a/playground/default/README.md b/playground/default/README.md index 02fe0be7..6b0f7bc7 100644 --- a/playground/default/README.md +++ b/playground/default/README.md @@ -13,17 +13,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/default/package.json b/playground/default/package.json index 603991dc..e02f7710 100644 --- a/playground/default/package.json +++ b/playground/default/package.json @@ -7,15 +7,16 @@ "preview": "vite preview --port 5050" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14" }, "devDependencies": { - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/default/src/main.js b/playground/default/src/main.js index 437d7358..f201f697 100644 --- a/playground/default/src/main.js +++ b/playground/default/src/main.js @@ -1,12 +1,12 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' Vue.use(VueCompositionAPI) -const app = new Vue({ - render: (h) => h(App) +const app = createApp({ + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/default/vite.config.js b/playground/default/vite.config.js index af324b38..42b92136 100644 --- a/playground/default/vite.config.js +++ b/playground/default/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/pinia-with-tests/README.md b/playground/pinia-with-tests/README.md index 1d559a05..7cadc127 100644 --- a/playground/pinia-with-tests/README.md +++ b/playground/pinia-with-tests/README.md @@ -13,30 +13,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/pinia-with-tests/package.json b/playground/pinia-with-tests/package.json index c74abeae..b8d63d97 100644 --- a/playground/pinia-with-tests/package.json +++ b/playground/pinia-with-tests/package.json @@ -11,20 +11,21 @@ "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14" }, "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/pinia-with-tests/src/main.js b/playground/pinia-with-tests/src/main.js index 82926e97..4167deec 100644 --- a/playground/pinia-with-tests/src/main.js +++ b/playground/pinia-with-tests/src/main.js @@ -1,15 +1,15 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/pinia-with-tests/vite.config.js b/playground/pinia-with-tests/vite.config.js index af324b38..42b92136 100644 --- a/playground/pinia-with-tests/vite.config.js +++ b/playground/pinia-with-tests/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/pinia/README.md b/playground/pinia/README.md index 37089835..68fea6a7 100644 --- a/playground/pinia/README.md +++ b/playground/pinia/README.md @@ -13,17 +13,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/pinia/package.json b/playground/pinia/package.json index e7a9f34d..eb0e0d17 100644 --- a/playground/pinia/package.json +++ b/playground/pinia/package.json @@ -7,16 +7,17 @@ "preview": "vite preview --port 5050" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14" }, "devDependencies": { - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/pinia/src/main.js b/playground/pinia/src/main.js index 82926e97..4167deec 100644 --- a/playground/pinia/src/main.js +++ b/playground/pinia/src/main.js @@ -1,15 +1,15 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/pinia/vite.config.js b/playground/pinia/vite.config.js index af324b38..42b92136 100644 --- a/playground/pinia/vite.config.js +++ b/playground/pinia/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/router-pinia-with-tests/README.md b/playground/router-pinia-with-tests/README.md index 7b87e89e..73c2578b 100644 --- a/playground/router-pinia-with-tests/README.md +++ b/playground/router-pinia-with-tests/README.md @@ -13,30 +13,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/router-pinia-with-tests/package.json b/playground/router-pinia-with-tests/package.json index 67811f09..d0be8609 100644 --- a/playground/router-pinia-with-tests/package.json +++ b/playground/router-pinia-with-tests/package.json @@ -11,7 +11,7 @@ "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14", "vue-router": "^3.5.3" @@ -19,13 +19,14 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/router-pinia-with-tests/src/main.js b/playground/router-pinia-with-tests/src/main.js index bbcfd4ff..4852af6b 100644 --- a/playground/router-pinia-with-tests/src/main.js +++ b/playground/router-pinia-with-tests/src/main.js @@ -1,17 +1,17 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ router, pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/router-pinia-with-tests/vite.config.js b/playground/router-pinia-with-tests/vite.config.js index af324b38..42b92136 100644 --- a/playground/router-pinia-with-tests/vite.config.js +++ b/playground/router-pinia-with-tests/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/router-pinia/README.md b/playground/router-pinia/README.md index 8ec2ec94..b4139dcf 100644 --- a/playground/router-pinia/README.md +++ b/playground/router-pinia/README.md @@ -13,17 +13,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/router-pinia/package.json b/playground/router-pinia/package.json index 3c4217c8..ac92ac21 100644 --- a/playground/router-pinia/package.json +++ b/playground/router-pinia/package.json @@ -7,17 +7,18 @@ "preview": "vite preview --port 5050" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14", "vue-router": "^3.5.3" }, "devDependencies": { - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/router-pinia/src/main.js b/playground/router-pinia/src/main.js index bbcfd4ff..4852af6b 100644 --- a/playground/router-pinia/src/main.js +++ b/playground/router-pinia/src/main.js @@ -1,17 +1,17 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ router, pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/router-pinia/vite.config.js b/playground/router-pinia/vite.config.js index af324b38..42b92136 100644 --- a/playground/router-pinia/vite.config.js +++ b/playground/router-pinia/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/router-with-tests/README.md b/playground/router-with-tests/README.md index 8de21b47..fcc40521 100644 --- a/playground/router-with-tests/README.md +++ b/playground/router-with-tests/README.md @@ -13,30 +13,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/router-with-tests/package.json b/playground/router-with-tests/package.json index 85b8af43..1c89bc04 100644 --- a/playground/router-with-tests/package.json +++ b/playground/router-with-tests/package.json @@ -11,20 +11,21 @@ "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14", "vue-router": "^3.5.3" }, "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/router-with-tests/src/main.js b/playground/router-with-tests/src/main.js index cc1d0fb7..2c19465d 100644 --- a/playground/router-with-tests/src/main.js +++ b/playground/router-with-tests/src/main.js @@ -1,14 +1,14 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -const app = new Vue({ +const app = createApp({ router, - render: (h) => h(App) + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/router-with-tests/vite.config.js b/playground/router-with-tests/vite.config.js index af324b38..42b92136 100644 --- a/playground/router-with-tests/vite.config.js +++ b/playground/router-with-tests/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/router/README.md b/playground/router/README.md index 049ddce0..b5ac62f4 100644 --- a/playground/router/README.md +++ b/playground/router/README.md @@ -13,17 +13,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/router/package.json b/playground/router/package.json index 866ce397..c54f84fe 100644 --- a/playground/router/package.json +++ b/playground/router/package.json @@ -7,16 +7,17 @@ "preview": "vite preview --port 5050" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14", "vue-router": "^3.5.3" }, "devDependencies": { - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/router/src/main.js b/playground/router/src/main.js index cc1d0fb7..2c19465d 100644 --- a/playground/router/src/main.js +++ b/playground/router/src/main.js @@ -1,14 +1,14 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -const app = new Vue({ +const app = createApp({ router, - render: (h) => h(App) + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/router/vite.config.js b/playground/router/vite.config.js index af324b38..42b92136 100644 --- a/playground/router/vite.config.js +++ b/playground/router/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-pinia-with-tests/README.md b/playground/typescript-pinia-with-tests/README.md index b0e3c8bd..8d012b0a 100644 --- a/playground/typescript-pinia-with-tests/README.md +++ b/playground/typescript-pinia-with-tests/README.md @@ -19,30 +19,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/typescript-pinia-with-tests/env.d.ts b/playground/typescript-pinia-with-tests/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-pinia-with-tests/env.d.ts +++ b/playground/typescript-pinia-with-tests/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-pinia-with-tests/package.json b/playground/typescript-pinia-with-tests/package.json index 659222cf..ab8521a3 100644 --- a/playground/typescript-pinia-with-tests/package.json +++ b/playground/typescript-pinia-with-tests/package.json @@ -12,7 +12,7 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14" }, @@ -20,15 +20,16 @@ "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-pinia-with-tests/src/main.ts b/playground/typescript-pinia-with-tests/src/main.ts index 82926e97..4167deec 100644 --- a/playground/typescript-pinia-with-tests/src/main.ts +++ b/playground/typescript-pinia-with-tests/src/main.ts @@ -1,15 +1,15 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-pinia-with-tests/vite.config.ts b/playground/typescript-pinia-with-tests/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-pinia-with-tests/vite.config.ts +++ b/playground/typescript-pinia-with-tests/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-pinia/README.md b/playground/typescript-pinia/README.md index 42e9e259..4522a444 100644 --- a/playground/typescript-pinia/README.md +++ b/playground/typescript-pinia/README.md @@ -19,17 +19,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/typescript-pinia/env.d.ts b/playground/typescript-pinia/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-pinia/env.d.ts +++ b/playground/typescript-pinia/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-pinia/package.json b/playground/typescript-pinia/package.json index a38a466d..df10276c 100644 --- a/playground/typescript-pinia/package.json +++ b/playground/typescript-pinia/package.json @@ -8,19 +8,20 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14" }, "devDependencies": { "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-pinia/src/main.ts b/playground/typescript-pinia/src/main.ts index 82926e97..4167deec 100644 --- a/playground/typescript-pinia/src/main.ts +++ b/playground/typescript-pinia/src/main.ts @@ -1,15 +1,15 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-pinia/vite.config.ts b/playground/typescript-pinia/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-pinia/vite.config.ts +++ b/playground/typescript-pinia/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-router-pinia-with-tests/README.md b/playground/typescript-router-pinia-with-tests/README.md index dc421902..13975b8d 100644 --- a/playground/typescript-router-pinia-with-tests/README.md +++ b/playground/typescript-router-pinia-with-tests/README.md @@ -19,30 +19,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/typescript-router-pinia-with-tests/env.d.ts b/playground/typescript-router-pinia-with-tests/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-router-pinia-with-tests/env.d.ts +++ b/playground/typescript-router-pinia-with-tests/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-router-pinia-with-tests/package.json b/playground/typescript-router-pinia-with-tests/package.json index 20e4dd86..01c47cc2 100644 --- a/playground/typescript-router-pinia-with-tests/package.json +++ b/playground/typescript-router-pinia-with-tests/package.json @@ -12,7 +12,7 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14", "vue-router": "^3.5.3" @@ -21,15 +21,16 @@ "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-router-pinia-with-tests/src/main.ts b/playground/typescript-router-pinia-with-tests/src/main.ts index bbcfd4ff..4852af6b 100644 --- a/playground/typescript-router-pinia-with-tests/src/main.ts +++ b/playground/typescript-router-pinia-with-tests/src/main.ts @@ -1,17 +1,17 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ router, pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-router-pinia-with-tests/vite.config.ts b/playground/typescript-router-pinia-with-tests/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-router-pinia-with-tests/vite.config.ts +++ b/playground/typescript-router-pinia-with-tests/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-router-pinia/README.md b/playground/typescript-router-pinia/README.md index cc10bc16..e02a6cc6 100644 --- a/playground/typescript-router-pinia/README.md +++ b/playground/typescript-router-pinia/README.md @@ -19,17 +19,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/typescript-router-pinia/env.d.ts b/playground/typescript-router-pinia/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-router-pinia/env.d.ts +++ b/playground/typescript-router-pinia/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-router-pinia/package.json b/playground/typescript-router-pinia/package.json index 3d8c1530..b9943fcb 100644 --- a/playground/typescript-router-pinia/package.json +++ b/playground/typescript-router-pinia/package.json @@ -8,20 +8,21 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "pinia": "^2.0.4", "vue": "^2.6.14", "vue-router": "^3.5.3" }, "devDependencies": { "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-router-pinia/src/main.ts b/playground/typescript-router-pinia/src/main.ts index bbcfd4ff..4852af6b 100644 --- a/playground/typescript-router-pinia/src/main.ts +++ b/playground/typescript-router-pinia/src/main.ts @@ -1,17 +1,17 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import { createPinia, PiniaVuePlugin } from 'pinia' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -Vue.use(PiniaVuePlugin) -const app = new Vue({ +const app = createApp({ router, pinia: createPinia(), - render: (h) => h(App) + render: () => h(App) }) +app.use(PiniaVuePlugin) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-router-pinia/vite.config.ts b/playground/typescript-router-pinia/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-router-pinia/vite.config.ts +++ b/playground/typescript-router-pinia/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-router-with-tests/README.md b/playground/typescript-router-with-tests/README.md index 486bd2d1..8d22235a 100644 --- a/playground/typescript-router-with-tests/README.md +++ b/playground/typescript-router-with-tests/README.md @@ -19,30 +19,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/typescript-router-with-tests/env.d.ts b/playground/typescript-router-with-tests/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-router-with-tests/env.d.ts +++ b/playground/typescript-router-with-tests/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-router-with-tests/package.json b/playground/typescript-router-with-tests/package.json index a35e9b18..439a388e 100644 --- a/playground/typescript-router-with-tests/package.json +++ b/playground/typescript-router-with-tests/package.json @@ -12,7 +12,7 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14", "vue-router": "^3.5.3" }, @@ -20,15 +20,16 @@ "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-router-with-tests/src/main.ts b/playground/typescript-router-with-tests/src/main.ts index cc1d0fb7..2c19465d 100644 --- a/playground/typescript-router-with-tests/src/main.ts +++ b/playground/typescript-router-with-tests/src/main.ts @@ -1,14 +1,14 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -const app = new Vue({ +const app = createApp({ router, - render: (h) => h(App) + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-router-with-tests/vite.config.ts b/playground/typescript-router-with-tests/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-router-with-tests/vite.config.ts +++ b/playground/typescript-router-with-tests/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-router/README.md b/playground/typescript-router/README.md index c2b4a865..3b172a2a 100644 --- a/playground/typescript-router/README.md +++ b/playground/typescript-router/README.md @@ -19,17 +19,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/typescript-router/env.d.ts b/playground/typescript-router/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-router/env.d.ts +++ b/playground/typescript-router/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-router/package.json b/playground/typescript-router/package.json index b2f813ef..b877124f 100644 --- a/playground/typescript-router/package.json +++ b/playground/typescript-router/package.json @@ -8,19 +8,20 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14", "vue-router": "^3.5.3" }, "devDependencies": { "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-router/src/main.ts b/playground/typescript-router/src/main.ts index cc1d0fb7..2c19465d 100644 --- a/playground/typescript-router/src/main.ts +++ b/playground/typescript-router/src/main.ts @@ -1,14 +1,14 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' import router from './router' Vue.use(VueCompositionAPI) -const app = new Vue({ +const app = createApp({ router, - render: (h) => h(App) + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-router/vite.config.ts b/playground/typescript-router/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-router/vite.config.ts +++ b/playground/typescript-router/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript-with-tests/README.md b/playground/typescript-with-tests/README.md index a8d2318d..cc1c517d 100644 --- a/playground/typescript-with-tests/README.md +++ b/playground/typescript-with-tests/README.md @@ -19,30 +19,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/typescript-with-tests/env.d.ts b/playground/typescript-with-tests/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript-with-tests/env.d.ts +++ b/playground/typescript-with-tests/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript-with-tests/package.json b/playground/typescript-with-tests/package.json index 49bf3064..1d8e5faf 100644 --- a/playground/typescript-with-tests/package.json +++ b/playground/typescript-with-tests/package.json @@ -12,22 +12,23 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14" }, "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript-with-tests/src/main.ts b/playground/typescript-with-tests/src/main.ts index 437d7358..f201f697 100644 --- a/playground/typescript-with-tests/src/main.ts +++ b/playground/typescript-with-tests/src/main.ts @@ -1,12 +1,12 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' Vue.use(VueCompositionAPI) -const app = new Vue({ - render: (h) => h(App) +const app = createApp({ + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript-with-tests/vite.config.ts b/playground/typescript-with-tests/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript-with-tests/vite.config.ts +++ b/playground/typescript-with-tests/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/typescript/README.md b/playground/typescript/README.md index 2745fb29..39ffcb21 100644 --- a/playground/typescript/README.md +++ b/playground/typescript/README.md @@ -19,17 +19,17 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Type-Check, Compile and Minify for Production ```sh -pnpm build +npm run build ``` diff --git a/playground/typescript/env.d.ts b/playground/typescript/env.d.ts index dc50f12e..cceeec5b 100644 --- a/playground/typescript/env.d.ts +++ b/playground/typescript/env.d.ts @@ -1,16 +1,2 @@ /// - -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} +/// diff --git a/playground/typescript/package.json b/playground/typescript/package.json index 1a86d017..cb02434c 100644 --- a/playground/typescript/package.json +++ b/playground/typescript/package.json @@ -8,18 +8,19 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14" }, "devDependencies": { "@types/node": "^16.11.10", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", - "typescript": "~4.5.2", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", + "typescript": "~4.5.5", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14", - "vue-tsc": "^0.29.6" + "vue-tsc": "^0.31.4" } } diff --git a/playground/typescript/src/main.ts b/playground/typescript/src/main.ts index 437d7358..f201f697 100644 --- a/playground/typescript/src/main.ts +++ b/playground/typescript/src/main.ts @@ -1,12 +1,12 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' Vue.use(VueCompositionAPI) -const app = new Vue({ - render: (h) => h(App) +const app = createApp({ + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/typescript/vite.config.ts b/playground/typescript/vite.config.ts index af324b38..42b92136 100644 --- a/playground/typescript/vite.config.ts +++ b/playground/typescript/vite.config.ts @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ diff --git a/playground/with-tests/README.md b/playground/with-tests/README.md index fa69ac2b..b3c75c42 100644 --- a/playground/with-tests/README.md +++ b/playground/with-tests/README.md @@ -13,30 +13,30 @@ See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup ```sh -pnpm install +npm install ``` ### Compile and Hot-Reload for Development ```sh -pnpm dev +npm run dev ``` ### Compile and Minify for Production ```sh -pnpm build +npm run build ``` ### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction) ```sh -pnpm test:unit # or `pnpm test:unit:ci` for headless testing +npm run test:unit # or `npm run test:unit:ci` for headless testing ``` ### Run End-to-End Tests with [Cypress](https://www.cypress.io/) ```sh -pnpm build -pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing +npm run build +npm run test:e2e # or `npm run test:e2e:ci` for headless testing ``` diff --git a/playground/with-tests/package.json b/playground/with-tests/package.json index e646ce45..0cc612da 100644 --- a/playground/with-tests/package.json +++ b/playground/with-tests/package.json @@ -11,19 +11,20 @@ "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'" }, "dependencies": { - "@vue/composition-api": "^1.4.0", + "@vue/composition-api": "^1.4.6", "vue": "^2.6.14" }, "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^2.2.4", - "@vitejs/plugin-legacy": "^1.6.3", - "@vue/runtime-dom": "^3.2.22", + "@vitejs/plugin-legacy": "^1.7.1", + "@vue/runtime-dom": "^3.2.31", "cypress": "^9.1.0", "start-server-and-test": "^1.14.0", - "unplugin-vue2-script-setup": "^0.7.1", - "vite": "^2.6.14", - "vite-plugin-vue2": "^1.9.0", + "unplugin-vue2-script-setup": "^0.9.3", + "vite": "^2.8.3", + "vite-plugin-vue2": "^1.9.3", + "vue-template-babel-compiler": "1.1.3", "vue-template-compiler": "^2.6.14" } } diff --git a/playground/with-tests/src/main.js b/playground/with-tests/src/main.js index 437d7358..f201f697 100644 --- a/playground/with-tests/src/main.js +++ b/playground/with-tests/src/main.js @@ -1,12 +1,12 @@ import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' +import VueCompositionAPI, { createApp, h } from '@vue/composition-api' import App from './App.vue' Vue.use(VueCompositionAPI) -const app = new Vue({ - render: (h) => h(App) +const app = createApp({ + render: () => h(App) }) -app.$mount('#app') +app.mount('#app') diff --git a/playground/with-tests/vite.config.js b/playground/with-tests/vite.config.js index af324b38..42b92136 100644 --- a/playground/with-tests/vite.config.js +++ b/playground/with-tests/vite.config.js @@ -3,13 +3,18 @@ import { fileURLToPath } from 'url' import { defineConfig } from 'vite' import legacy from '@vitejs/plugin-legacy' import { createVuePlugin as vue2 } from 'vite-plugin-vue2' +// @ts-ignore +import vueTemplateBabelCompiler from 'vue-template-babel-compiler' import scriptSetup from 'unplugin-vue2-script-setup/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue2({ - jsx: true + jsx: true, + vueTemplateOptions: { + compiler: vueTemplateBabelCompiler + } }), scriptSetup(), legacy({ -- 2.47.3