Skip to content

Commit

Permalink
Fix displaying third party webpack plugins errors (#5137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fer0x authored and Timer committed Sep 27, 2018
1 parent ce5a2e4 commit be8f9da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-dev-utils/formatWebpackMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ function formatMessage(message, isError) {
return message.indexOf('Thread Loader (Worker') === -1;
});

// Add empty line for errors from third-party webpack plugins
if (lines.length < 2) {
lines[1] = '';
}

// Strip `ModuleWarning` head off message before parsing (because of ESLint)
// https://github.com/webpack/webpack/blob/c77030573de96b8293c69dd396492f8e2d46561e/lib/ModuleWarning.js
var moduleWarningPrefix = 'Module Warning: ';
Expand Down

0 comments on commit be8f9da

Please sign in to comment.