Skip to content

Commit

Permalink
Only show first error (#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored May 11, 2017
1 parent 3521eb7 commit 1ede6a8
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 1ede6a8

Please sign in to comment.