Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build not exiting in dev env #1643

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cli.js
Expand Up @@ -177,6 +177,7 @@ async function bundle(main, command) {
const Bundler = require('../');

if (command.name() === 'build') {
command.watch = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should set command.production = true here actually, which would implicitly disable watching as well. I believe #1600 was meant to keep environment variables as set by the user, not control actual build. That can be done with other command line flags, e.g. if you want to disable minification, use --no-minify.

process.env.NODE_ENV = process.env.NODE_ENV || 'production';
} else {
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
Expand Down