We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ceabc6 commit 49c236dCopy full SHA for 49c236d
bin/webpack-dev-server.js
@@ -307,7 +307,20 @@ function processOptions(wpOpt) {
307
});
308
}
309
310
- var compiler = webpack(wpOpt);
+ var compiler;
311
+ try {
312
+ compiler = webpack(wpOpt);
313
+ } catch(e) {
314
+ var WebpackOptionsValidationError = require("webpack/lib/WebpackOptionsValidationError");
315
+ if(e instanceof WebpackOptionsValidationError) {
316
+ if(options.stats.colors)
317
+ console.error("\u001b[1m\u001b[31m" + e.message + "\u001b[39m\u001b[22m");
318
+ else
319
+ console.error(e.message);
320
+ process.exit(1); // eslint-disable-line
321
+ }
322
+ throw e;
323
324
325
if(argv["progress"]) {
326
compiler.apply(new webpack.ProgressPlugin({
0 commit comments