Skip to content

Commit 57334ca

Browse files
committed
Improve error messages
1 parent f27d490 commit 57334ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/WebpackConfig.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class WebpackConfig {
396396
}
397397

398398
if (this.doesBabelRcFileExist()) {
399-
logger.warning('The "callback" argument of configureBabel() will not be used because your app already provides an external Babel configuration (a ".babelrc" file, ".babelrc.js" file or "babel" key in "package.json"). Use null as a first argument to remove that warning.');
399+
logger.warning('The "callback" argument of configureBabel() will not be used because your app already provides an external Babel configuration (e.g. a ".babelrc" or "babelrc.config.js" file or "babel" key in "package.json"). Use null as a first argument to remove that warning.');
400400
}
401401
}
402402

@@ -415,7 +415,7 @@ class WebpackConfig {
415415
}
416416

417417
if (this.doesBabelRcFileExist() && !allowedOptionsWithExternalConfig.includes(normalizedOptionKey)) {
418-
logger.warning(`The "${normalizedOptionKey}" option of configureBabel() will not be used because your app already provides an external Babel configuration (a ".babelrc" file, ".babelrc.js" file or "babel" key in "package.json").`);
418+
logger.warning(`The "${normalizedOptionKey}" option of configureBabel() will not be used because your app already provides an external Babel configuration (e.g. a ".babelrc" or "babelrc.config.js" file or "babel" key in "package.json").`);
419419
continue;
420420
}
421421

@@ -462,7 +462,7 @@ class WebpackConfig {
462462
}
463463

464464
if (this.doesBabelRcFileExist()) {
465-
throw new Error('The "callback" argument of configureBabelPresetEnv() will not be used because your app already provides an external Babel configuration (a ".babelrc" file, ".babelrc.js" file or "babel" key in "package.json").');
465+
throw new Error('The "callback" argument of configureBabelPresetEnv() will not be used because your app already provides an external Babel configuration (e.g. a ".babelrc" or "babelrc.config.js" file or "babel" key in "package.json").');
466466
}
467467

468468
this.babelPresetEnvOptionsCallback = callback;

0 commit comments

Comments
 (0)