Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 20, 2020
1 parent c43b93b commit 685df00
Showing 1 changed file with 8 additions and 1 deletion.
@@ -1,7 +1,14 @@
const logger = require('../logger');

module.exports = (compiler) => {
/**
* warn the user if bail and watch both are used together
* @param {Object} webpack compiler
* @returns {void}
*/
const bailAndWatchWarning = (compiler) => {
if (compiler.options.bail && compiler.options.watch) {
logger.warn('You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.');
}
};

module.exports = bailAndWatchWarning;

0 comments on commit 685df00

Please sign in to comment.