Skip to content

Commit 755b5cd

Browse files
authored
feat: add vue-template-babel-compiler for optional chaining (vuejs#59)
1 parent ed0232b commit 755b5cd

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

template/base/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
"preview": "vite preview --port 5050"
66
},
77
"dependencies": {
8-
"@vue/composition-api": "^1.4.0",
8+
"@vue/composition-api": "^1.4.6",
99
"vue": "^2.6.14"
1010
},
1111
"devDependencies": {
12-
"@vitejs/plugin-legacy": "^1.6.3",
13-
"@vue/runtime-dom": "^3.2.22",
14-
"unplugin-vue2-script-setup": "^0.7.1",
15-
"vite": "^2.6.14",
16-
"vite-plugin-vue2": "^1.9.0",
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",
1718
"vue-template-compiler": "^2.6.14"
1819
}
1920
}

template/base/vite.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ import { fileURLToPath } from 'url'
33
import { defineConfig } from 'vite'
44
import legacy from '@vitejs/plugin-legacy'
55
import { createVuePlugin as vue2 } from 'vite-plugin-vue2'
6+
// @ts-ignore
7+
import vueTemplateBabelCompiler from 'vue-template-babel-compiler'
68
import scriptSetup from 'unplugin-vue2-script-setup/vite'
79

810
// https://vitejs.dev/config/
911
export default defineConfig({
1012
plugins: [
1113
vue2({
12-
jsx: true
14+
jsx: true,
15+
vueTemplateOptions: {
16+
compiler: vueTemplateBabelCompiler
17+
}
1318
}),
1419
scriptSetup(),
1520
legacy({

template/config/typescript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"devDependencies": {
77
"@types/node": "^16.11.10",
8-
"typescript": "~4.5.2",
9-
"vue-tsc": "^0.29.6"
8+
"typescript": "~4.5.5",
9+
"vue-tsc": "^0.31.4"
1010
}
1111
}

0 commit comments

Comments
 (0)