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({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
include: /\.min\.js$/,
|
include: /\.min\.js$/,
|
||||||
minimize: true,
|
minimize: true
|
||||||
sourceMap: true
|
|
||||||
})
|
})
|
||||||
]
|
] : []
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
|
|||||||
Reference in New Issue
Block a user