|
@@ -60,12 +60,21 @@ if (process.env.npm_lifecycle_script.includes('production')) {
|
|
|
'@babel/plugin-transform-runtime',
|
|
|
],
|
|
|
babel({
|
|
|
+ presets: ['@babel/preset-env'],
|
|
|
exclude: "node_modules/**"
|
|
|
}),
|
|
|
// 压缩代码
|
|
|
uglify()
|
|
|
]
|
|
|
})
|
|
|
+} else {
|
|
|
+ builds.forEach(item => {
|
|
|
+ item.plugins = [
|
|
|
+ babel({
|
|
|
+ presets: ['@babel/preset-env']
|
|
|
+ }),
|
|
|
+ ]
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|