Commit 1ede6a8d authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Only show first error (#2125)

parent 3521eb7c
Showing with 5 additions and 0 deletions
+5 -0
...@@ -177,6 +177,11 @@ function formatWebpackMessages(json) { ...@@ -177,6 +177,11 @@ function formatWebpackMessages(json) {
// preceding a much more useful Babel syntax error. // preceding a much more useful Babel syntax error.
result.errors = result.errors.filter(isLikelyASyntaxError); 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; return result;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment