diff --git a/packages/react-dev-utils/formatWebpackMessages.js b/packages/react-dev-utils/formatWebpackMessages.js index 1d0f7c5cdae..98f92c0ac1b 100644 --- a/packages/react-dev-utils/formatWebpackMessages.js +++ b/packages/react-dev-utils/formatWebpackMessages.js @@ -21,10 +21,12 @@ function formatMessage(message) { lines = message.split('\n'); } else if ('message' in message) { lines = message['message'].split('\n'); + lines.unshift(`Error in ${message['file']}`); } else if (Array.isArray(message)) { message.forEach(message => { if ('message' in message) { lines = message['message'].split('\n'); + lines.unshift(`Error in ${message['file']}`); } }); }