mirror of https://github.com/webpack/webpack.git
perf: Enables uglify cache in prod mode
This commit is contained in:
parent
0968e1ca77
commit
bf93a87a1d
|
|
@ -140,6 +140,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
|||
// Lazy load the uglifyjs plugin
|
||||
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
new UglifyJsPlugin({
|
||||
cache: true,
|
||||
sourceMap: options.devtool && /source-?map/.test(options.devtool)
|
||||
}).apply(compiler);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue