Skip to content

Commit

Permalink
fix(build): correctly setup uglify options
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Jun 17, 2017
1 parent cd87599 commit 6c0f4b2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 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')
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit 6c0f4b2

Please sign in to comment.