Merge pull request #1918 from bradleyayers/patch-1

Gracefully handle fatal webpack errors.
This commit is contained in:
Norbert de Langen 2017-09-30 10:44:08 +02:00 committed by GitHub
commit 928166ca2c

View File

@ -83,7 +83,7 @@ webpack(config).run((err, stats) => {
// eslint-disable-next-line no-unused-expressions
err && logger.error(err.message);
// eslint-disable-next-line no-unused-expressions
stats.hasErrors() && stats.toJson().errors.forEach(e => logger.error(e));
stats && stats.hasErrors() && stats.toJson().errors.forEach(e => logger.error(e));
process.exit(1);
}