perf: Enables uglify cache in prod mode

This commit is contained in:
Joshua Wiens 2017-12-17 08:48:01 -06:00
parent 0968e1ca77
commit bf93a87a1d
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}