Optimize webpack rebuild speed (#5065)

Derived from https://github.com/facebook/create-react-app/issues/4492#issuecomment-421959548
This commit is contained in:
Joe Haddad
2018-09-22 13:44:58 -04:00
committed by GitHub
parent b181f92650
commit b8da58499a
3 changed files with 9 additions and 3 deletions

View File

@@ -142,7 +142,9 @@ function build(previousFileSizes) {
if (err) {
return reject(err);
}
const messages = formatWebpackMessages(stats.toJson({}, true));
const messages = formatWebpackMessages(
stats.toJson({ all: false, warnings: true, errors: true })
);
if (messages.errors.length) {
// Only keep the first error. Others are often indicative
// of the same problem, but confuse the reader with noise.