Skip to content

Commit bbfe6e6

Browse files
gaearonromaindso
authored andcommitted
Only show first error (facebook#2125)
1 parent 3c13419 commit bbfe6e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-dev-utils/formatWebpackMessages.js

+5
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ function formatWebpackMessages(json) {
177177
// preceding a much more useful Babel syntax error.
178178
result.errors = result.errors.filter(isLikelyASyntaxError);
179179
}
180+
// Only keep the first error. Others are often indicative
181+
// of the same problem, but confuse the reader with noise.
182+
if (result.errors.length > 1) {
183+
result.errors.length = 1;
184+
}
180185
return result;
181186
}
182187

0 commit comments

Comments
 (0)