No react warnings in bundles
This commit is contained in:
parent
a7c77ff9d1
commit
a06f7ac5d1
15
gulpfile.js
15
gulpfile.js
|
@ -46,9 +46,15 @@ var loaders = [
|
||||||
]
|
]
|
||||||
|
|
||||||
// create a single instance of the compiler to allow caching
|
// create a single instance of the compiler to allow caching
|
||||||
var plugins = [bannerPlugin]
|
var plugins = [
|
||||||
|
bannerPlugin,]
|
||||||
if (!WATCHING) {
|
if (!WATCHING) {
|
||||||
plugins.push(new webpack.optimize.UglifyJsPlugin())
|
plugins.push(new webpack.optimize.UglifyJsPlugin())
|
||||||
|
plugins.push(new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
NODE_ENV: JSON.stringify('production')
|
||||||
|
}
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
var compiler = webpack({
|
var compiler = webpack({
|
||||||
entry: ENTRY,
|
entry: ENTRY,
|
||||||
|
@ -83,7 +89,12 @@ var compilerMinimalist = webpack({
|
||||||
bannerPlugin,
|
bannerPlugin,
|
||||||
new webpack.NormalModuleReplacementPlugin(new RegExp('/assets/ace$'), EMPTY),
|
new webpack.NormalModuleReplacementPlugin(new RegExp('/assets/ace$'), EMPTY),
|
||||||
new webpack.NormalModuleReplacementPlugin(new RegExp('^ajv$'), 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: {
|
module: {
|
||||||
loaders: loaders
|
loaders: loaders
|
||||||
|
|
Loading…
Reference in New Issue