Added process.env.NODE_ENV to webpack.DefinePlugin

This commit is contained in:
Andrey Okonetchnikov 2016-10-06 15:59:19 +02:00
parent de5958752a
commit 60ec67c2a9

View File

@ -1,3 +1,5 @@
/* eslint global-require: 0 */
const webpack = require('webpack');
module.exports = {
@ -5,11 +7,11 @@ module.exports = {
loaders: [
{
test: /\.((png)|(eot)|(woff)|(woff2)|(ttf)|(svg)|(gif))(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader?limit=100000'
loader: 'url-loader?limit=100000',
},
{
test: /\.json$/,
loader: 'json-loader'
loader: 'json-loader',
},
{
test: /\.scss$/,
@ -31,15 +33,21 @@ module.exports = {
'transform-object-assign',
'transform-object-rest-spread',
'lodash',
'react-hot-loader/babel'
]
}
}
]
'react-hot-loader/babel',
],
},
},
],
},
postcss: [
require('postcss-import')({ addDependencyTo: webpack }),
require('postcss-cssnext')
require('postcss-cssnext'),
],
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
],
};