Skip to content

Commit

Permalink
Limit console warnings to 5 files at most (#2327)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored May 22, 2017
1 parent 42efedb commit 9cfa355
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react-dev-utils/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ function handleWarnings(warnings) {

if (typeof console !== 'undefined' && typeof console.warn === 'function') {
for (var i = 0; i < formatted.warnings.length; i++) {
if (i === 5) {
console.warn(
'There were more warnings in other files.\n' +
'You can find a complete log in the terminal.'
);
break;
}
console.warn(stripAnsi(formatted.warnings[i]));
}
}
Expand Down

0 comments on commit 9cfa355

Please sign in to comment.