Only uglify if building for production.
Uglify was trying to run always, including the dev-server output, which included es6 that broke uglifier.
This commit is contained in:
@@ -27,13 +27,12 @@ const base = {
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
plugins: process.env.NODE_ENV === 'production' ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
include: /\.min\.js$/,
|
||||
minimize: true,
|
||||
sourceMap: true
|
||||
minimize: true
|
||||
})
|
||||
]
|
||||
] : []
|
||||
};
|
||||
|
||||
module.exports = [
|
||||
|
||||
Reference in New Issue
Block a user