webpack.optimize.UglifyJsPlugin
2019-12-14 本文已影响0人
shmaur
webpack4.x下,压缩代码不在webpack.config.js中写plugins: [ new webpack.optimize.UglifyJsPlugin() ],而是在package.json中的script下面写:
"start": "webpack --mode production",
"build": "webpack --mode development"