Skip to content

Commit 2746db1

Browse files
gaearonromaindso
authored andcommittedJul 10, 2017
Limit console warnings to 5 files at most (facebook#2327)
1 parent c6f5306 commit 2746db1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎packages/react-dev-utils/webpackHotDevClient.js

+7
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,13 @@ function handleWarnings(warnings) {
228228

229229
if (typeof console !== 'undefined' && typeof console.warn === 'function') {
230230
for (var i = 0; i < formatted.warnings.length; i++) {
231+
if (i === 5) {
232+
console.warn(
233+
'There were more warnings in other files.\n' +
234+
'You can find a complete log in the terminal.'
235+
);
236+
break;
237+
}
231238
console.warn(stripAnsi(formatted.warnings[i]));
232239
}
233240
}

0 commit comments

Comments
 (0)
Please sign in to comment.