Skip to content

Commit

Permalink
Only show first error (facebook#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored and romaindso committed Jul 10, 2017
1 parent 3c13419 commit bbfe6e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-dev-utils/formatWebpackMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ function formatWebpackMessages(json) {
// preceding a much more useful Babel syntax error.
result.errors = result.errors.filter(isLikelyASyntaxError);
}
// Only keep the first error. Others are often indicative
// of the same problem, but confuse the reader with noise.
if (result.errors.length > 1) {
result.errors.length = 1;
}
return result;
}

Expand Down

0 comments on commit bbfe6e6

Please sign in to comment.