mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-04-18 19:33:14 +08:00
feat: update ts deps version
This commit is contained in:
parent
e74f0fbda4
commit
35fc5d17c3
@ -57,6 +57,7 @@ module.exports = (api, options, rootOptions) => {
|
|||||||
})
|
})
|
||||||
if (options.template === 'default-ts') { // 启用 typescript
|
if (options.template === 'default-ts') { // 启用 typescript
|
||||||
api.extendPackage(pkg => {
|
api.extendPackage(pkg => {
|
||||||
|
const isV4 = api.cliVersion.split('.')[0] === '4'
|
||||||
return {
|
return {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
'vue-class-component': '^6.3.2',
|
'vue-class-component': '^6.3.2',
|
||||||
@ -64,8 +65,8 @@ module.exports = (api, options, rootOptions) => {
|
|||||||
},
|
},
|
||||||
devDependencies: {
|
devDependencies: {
|
||||||
'@babel/plugin-syntax-typescript': '^7.2.0',
|
'@babel/plugin-syntax-typescript': '^7.2.0',
|
||||||
'@vue/cli-plugin-typescript': '~4.5.11',
|
'@vue/cli-plugin-typescript': '~' + api.cliServiceVersion,
|
||||||
'typescript': api.hasPlugin('eslint') ? '~3.1.1' : '^3.0.0'
|
'typescript': isV4 ? '~4.1.5' : '~4.5.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user