Skip to content

Commit

Permalink
Set user provided NODE_ENV if provided with build command, fixes #702 (
Browse files Browse the repository at this point in the history
…#1600)

Like others in #702, there are times when I need a development build. This change remedies that by using the `NODE_ENV` set by a user in the build command, but will default to `production` is none is provided.
  • Loading branch information
chances authored and devongovett committed Jun 23, 2018
1 parent 0742b09 commit 1b6a93f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.js
Expand Up @@ -174,7 +174,7 @@ async function bundle(main, command) {
const Bundler = require('../');

if (command.name() === 'build') {
process.env.NODE_ENV = 'production';
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
} else {
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
}
Expand Down

0 comments on commit 1b6a93f

Please sign in to comment.