package.json配置
"webpack": "3.10.0",
"uglifyjs-webpack-plugin": "^1.3.0",
webpack.config.js配置
const UglifyJsPlugin = require(\'uglifyjs-webpack-plugin\');
组件加载
config.plugins.push(
new UglifyJsPlugin({
parallel: 4,
uglifyOptions: {
output: {
comments: false,
beautify: false,
},
compress: {
warnings: false
},
},
cache: true,
}),
);