mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-04 21:19:47 +08:00
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:
committed by
Joe Haddad
parent
d009a99094
commit
badfc2a8d9
@@ -164,6 +164,11 @@ function createCompiler(webpack, config, appName, urls, useYarn) {
|
||||
|
||||
// If errors exist, only show errors.
|
||||
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;
|
||||
}
|
||||
console.log(chalk.red('Failed to compile.\n'));
|
||||
console.log(messages.errors.join('\n\n'));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user