Skip to content

Commit

Permalink
More flexible NODE_ENV with DefinePlugin (#866)
Browse files Browse the repository at this point in the history
* More flexible NODE_ENV with DefinePlugin

* Fixed trailing space
  • Loading branch information
amilajack authored Mar 31, 2017
1 parent 1a4b066 commit b64264e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webpack.config.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ export default merge(baseConfig, {
*
* NODE_ENV should be production so that modules do not perform certain
* development checks
*
* By default, use 'development' as NODE_ENV. This can be overriden with
* 'staging', for example, by changing the ENV variables in the npm scripts
*/
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
}),
// turn debug mode on.
new webpack.LoaderOptionsPlugin({
Expand Down

0 comments on commit b64264e

Please sign in to comment.