From 6c0f4b25a6ac4dce035d36b7f89f1e9bfbe7d323 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Sat, 17 Jun 2017 20:39:06 +0200 Subject: [PATCH] fix(build): correctly setup uglify options --- webpack.config.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 38f9852..2416ea3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,6 @@ const { resolve } = require('path') const webpack = require('webpack') -const UglifyJSPlugin = require('uglifyjs-webpack-plugin') +const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const { getIfUtils, removeEmpty } = require('webpack-config-utils') const packageJSON = require('./package.json') @@ -63,9 +63,13 @@ const config = (env = DEFAULT_ENV) => { new webpack.optimize.ModuleConcatenationPlugin(), // Apply minification only on the second bundle by using a RegEx on the name, which must end with `.min.js` ifProd( - new UglifyJSPlugin({ + new UglifyJsPlugin({ sourceMap: true, - include: /\.min\.js$/, + compress: { + screw_ie8: true, + warnings: false, + }, + output: { comments: false }, }) ), new webpack.LoaderOptionsPlugin({