This commit is contained in:
2022-07-09 14:45:45 +08:00
parent 458147dac3
commit 148671a2e2
7 changed files with 79 additions and 34 deletions
+22 -1
View File
@@ -5,7 +5,28 @@ module.exports = {
},
defineConstants: {
},
mini: {},
mini: {
// optimizeMainPackage: {
// enable: true
// },
webpackChain: (chain, webpack) => {
chain.merge({
plugin: {
install: {
plugin: require('terser-webpack-plugin'),
args: [{
terserOptions: {
compress: true, // 默认使用terser压缩
// mangle: false,
keep_classnames: true, // 不改变class名称
keep_fnames: true // 不改变函数名称
}
}]
}
}
})
}
},
h5: {},
alias: {
'@': path.resolve(__dirname, '..', 'src'),