Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Exit on any errors passed in build stats
  • Loading branch information
Patrick Dillon committed Oct 6, 2016
commit 43014e87ecdbb342ab1fe7a6e0d4b48ebd10cb4b
7 changes: 7 additions & 0 deletions packages/react-scripts/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ function build(previousSizeMap) {
process.exit(1);
}

// Webpack may swallow uglify errors even with bail:true
if (stats.compilation.errors.length) {
console.error(chalk.red('Error(s) occurred during the production build:'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be the same message that we use for failed compilation in start.js? And would be nice to fix it up for the other (different) message in this file so they are all consistent.

stats.compilation.errors.forEach(err => console.error(chalk.red(err.message || err)));
process.exit(1);
}

console.log(chalk.green('Compiled successfully.'));
console.log();

Expand Down