From be8f9da4cf2ce0ac11c0483c22d84072ddb2342c Mon Sep 17 00:00:00 2001 From: Viktor Havrylin Date: Thu, 27 Sep 2018 19:02:17 +0300 Subject: [PATCH] Fix displaying third party webpack plugins errors (#5137) --- packages/react-dev-utils/formatWebpackMessages.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-dev-utils/formatWebpackMessages.js b/packages/react-dev-utils/formatWebpackMessages.js index a6872a18971..2c4edc07eb0 100644 --- a/packages/react-dev-utils/formatWebpackMessages.js +++ b/packages/react-dev-utils/formatWebpackMessages.js @@ -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: ';