mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-16 16:19:48 -05:00
Don't run UglifyJS unless it's a production build
This commit is contained in:
parent
8f4bc64154
commit
f392678174
1 changed files with 7 additions and 4 deletions
|
@ -141,9 +141,6 @@ module.exports = {
|
|||
{from: 'static'},
|
||||
{from: 'intl', to: 'js'}
|
||||
]),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: true
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
||||
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
|
||||
|
@ -154,5 +151,11 @@ module.exports = {
|
|||
name: 'common',
|
||||
filename: 'js/common.bundle.js'
|
||||
})
|
||||
])
|
||||
]).concat(process.env.NODE_ENV === 'production' ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
] : [])
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue