npm i uglifyjs-webpack-plugin@1
configureWebpack: config => {
let plugins = [
new UglifyJsPlugin({
uglifyOptions: {
output: {
comments: false
},
compress: {
warnings: false,
drop_debugger: true,
drop_console: true,
},
},
sourceMap: false,
parallel: true,
})
];
config.plugins = [...config.plugins, ...plugins];
}