chore: webpack编译优化

This commit is contained in:
eric
2022-11-13 11:14:11 +08:00
parent 750a6344a7
commit f3e62862fc
40 changed files with 165 additions and 50953 deletions

View File

@@ -3,6 +3,26 @@ module.exports = {
NODE_ENV: '"development"',
},
defineConstants: {},
mini: {},
mini: {
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: {},
};