From dbeaeb2a43a24ca25513ef7d707d1eeab26a258d Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Thu, 17 Sep 2020 21:26:50 +0530 Subject: [PATCH] refactor: condition --- packages/webpack-cli/lib/utils/Compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-cli/lib/utils/Compiler.js b/packages/webpack-cli/lib/utils/Compiler.js index 02176653d2c..bc8848c414e 100644 --- a/packages/webpack-cli/lib/utils/Compiler.js +++ b/packages/webpack-cli/lib/utils/Compiler.js @@ -118,7 +118,7 @@ class Compiler { } //warn the user if bail and watch both are used together - if (this.compiler.options.bail && (outputOptions.watch || options.watch)) { + if (this.compiler.options.bail && this.compiler.watch) { logger.warn('You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.'); }