Skip to content

Commit

Permalink
refactor: rm duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 18, 2020
1 parent 6b44fe9 commit 8cbf376
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions packages/webpack-cli/lib/groups/ConfigGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ class ConfigGroup extends GroupHelper {
newOptionsObject['options'] = configOptions;
}

//warn the user if bail and watch both are used together
if (configOptions.bail && configOptions.watch) {
logger.warn('You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.');
}

if (configOptions && configPath.includes('.webpack')) {
const currentPath = configPath;
const parentContext = dirname(currentPath).split(sep).slice(0, -1).join(sep);
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-cli/lib/utils/Compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Compiler {
}

//warn the user if bail and watch both are used together
if (this.compiler.options.bail && outputOptions.watch) {
if (this.compiler.options.bail && (outputOptions.watch || options.watch)) {
logger.warn('You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.');
}

Expand Down

0 comments on commit 8cbf376

Please sign in to comment.