mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-04-27 15:30:11 +08:00
fix: @babel/runtime use v7.18+
This commit is contained in:
parent
6d8bddc41b
commit
a3e327e2ee
13
generator.js
13
generator.js
@ -39,19 +39,12 @@ module.exports = (api, options, rootOptions) => {
|
|||||||
]
|
]
|
||||||
api.extendPackage(pkg => {
|
api.extendPackage(pkg => {
|
||||||
return {
|
return {
|
||||||
dependencies: {
|
|
||||||
'regenerator-runtime': '^0.12.1',// 锁定版本,避免高版本在小程序中出错
|
|
||||||
'@dcloudio/uni-helper-json': '*'
|
|
||||||
},
|
|
||||||
devDependencies: {
|
devDependencies: {
|
||||||
"@babel/runtime": "~7.17.9",// 临时指定版本,7.13.x 会报错
|
'@dcloudio/uni-helper-json': '*',
|
||||||
'postcss-comment': '^2.0.0',
|
|
||||||
'@dcloudio/types': '^3.0.4',
|
'@dcloudio/types': '^3.0.4',
|
||||||
'miniprogram-api-typings': '*',
|
'miniprogram-api-typings': '*',
|
||||||
'mini-types': '*'
|
'mini-types': '*',
|
||||||
},
|
'postcss-comment': '^2.0.0'
|
||||||
resolutions: {
|
|
||||||
"@babel/runtime": "~7.17.9"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -51,6 +51,10 @@ process.UNI_LIBRARIES.forEach(libraryName => {
|
|||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (process.env.UNI_PLATFORM !== 'h5') {
|
||||||
|
plugins.push('@babel/plugin-transform-runtime')
|
||||||
|
}
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user