Unverified Commit 91c67568 authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

Merge pull request #1690 from as-com/uglify-development

Don't run UglifyJS unless it's a production build
parents c5ea0579 aee9f0c6
...@@ -141,9 +141,6 @@ module.exports = { ...@@ -141,9 +141,6 @@ module.exports = {
{from: 'static'}, {from: 'static'},
{from: 'intl', to: 'js'} {from: 'intl', to: 'js'}
]), ]),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true
}),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"', 'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"', 'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
...@@ -155,4 +152,11 @@ module.exports = { ...@@ -155,4 +152,11 @@ module.exports = {
filename: 'js/common.bundle.js' filename: 'js/common.bundle.js'
}) })
]) ])
.concat(process.env.NODE_ENV === 'production' ? [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
] : [])
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment