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: show warning if bail and watch are used together #1804

Merged
merged 5 commits into from Sep 21, 2020

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
maybe fix

Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
No
Summary
Fixes #1794

show a warning if bail and watch are used together with either config or as cli args.

Does this PR introduce a breaking change?
No

Other information
No

expect(stderr).toContain(`You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.`);
expect(stdout).toBeTruthy();
});
});
Copy link
Member

Choose a reason for hiding this comment

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

Can we add tests where bail: false and watch: true/watch: false and bail: true and check there is not warnings/errors?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

evenstensberg
evenstensberg previously approved these changes Sep 20, 2020
rishabh3112
rishabh3112 previously approved these changes Sep 20, 2020
Copy link
Member

@rishabh3112 rishabh3112 left a comment

Choose a reason for hiding this comment

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

Left a small suggestion.
Rest looks good to me.

@@ -0,0 +1,7 @@
const logger = require('../logger');

module.exports = (compiler) => {
Copy link
Member

Choose a reason for hiding this comment

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

Assign this to variable and then assign it to module.exports.
Add a comment about function(or file) as well.

@webpack-bot
Copy link

@jamesgeorge007 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@evenstensberg Please review the new changes.

@snitin315 snitin315 merged commit 6140b24 into next Sep 21, 2020
@snitin315 snitin315 deleted the fix/bail-watch-warn branch September 21, 2020 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bail = true should not kill watch mode on ModuleNotFound error
6 participants