mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-12 22:46:30 +08:00
Only show first error (#2125)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user