aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.d/minify.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.d/minify.js')
-rw-r--r--webpack.config.d/minify.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/webpack.config.d/minify.js b/webpack.config.d/minify.js
index 3bc8e884..d85c861c 100644
--- a/webpack.config.d/minify.js
+++ b/webpack.config.d/minify.js
@@ -1,5 +1,16 @@
if (defined.PRODUCTION) {
- config.plugins.push(new webpack.optimize.UglifyJsPlugin({
- minimize: true
- }));
+ const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
+
+ config.optimization = {
+ minimizer: [
+ new UglifyJSPlugin({
+ uglifyOptions: {
+ compress: {
+ unused: false
+ }
+ }
+ })
+ ]
+ }
+
}