No react warnings in bundles

This commit is contained in:
jos 2016-10-28 23:06:49 +02:00
parent a7c77ff9d1
commit a06f7ac5d1
1 changed files with 13 additions and 2 deletions

View File

@ -46,9 +46,15 @@ var loaders = [
]
// create a single instance of the compiler to allow caching
var plugins = [bannerPlugin]
var plugins = [
bannerPlugin,]
if (!WATCHING) {
plugins.push(new webpack.optimize.UglifyJsPlugin())
plugins.push(new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}))
}
var compiler = webpack({
entry: ENTRY,
@ -83,7 +89,12 @@ var compilerMinimalist = webpack({
bannerPlugin,
new webpack.NormalModuleReplacementPlugin(new RegExp('/assets/ace$'), EMPTY),
new webpack.NormalModuleReplacementPlugin(new RegExp('^ajv$'), EMPTY),
new webpack.optimize.UglifyJsPlugin()
new webpack.optimize.UglifyJsPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
})
],
module: {
loaders: loaders