Make formatWebpackMessages return all messages (#2834)

* Move the reduction of the messages to a single place in the place it is used.

* Fix variable name
This commit is contained in:
Stéphane Goetz
2017-08-09 03:37:04 +02:00
committed by Joe Haddad
parent d009a99094
commit badfc2a8d9
3 changed files with 10 additions and 5 deletions

View File

@@ -122,6 +122,11 @@ function build(previousFileSizes) {
}
const messages = formatWebpackMessages(stats.toJson({}, true));
if (messages.errors.length) {
// Only keep the first error. Others are often indicative
// of the same problem, but confuse the reader with noise.
if (messages.errors.length > 1) {
messages.errors.length = 1;
}
return reject(new Error(messages.errors.join('\n\n')));
}
if (