You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors in the browser console appear duplicated, regardless of the loader:
Expected/desired behavior:
The error message should not be printed twice.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
npm i -g create-react-app
create-react-app mystuff --scripts-version 0.5.1
cd mystuff
npm start
Then make a syntax error in src/App.js or src/App.css and inspect browser output.
You can find the config here.
What is the expected behavior?
The error message should not be printed twice.
What is the motivation / use case for changing the behavior?
Seeing it printed twice is confusing and annoying.
Browser: all
Language: all
(I file this in Webpack repo because the error string is passed to WDS already in this form.)
The text was updated successfully, but these errors were encountered:
This took some debugging, but I finally found where the issue is :). webpack-dev-server uses stats.toJson() (without parameters), gets the errors property from the resulting object and then passes that to the WebSocket to display the error. This errors property is an array of errors.
However, if .toJson() is used without options, it defaults to adding "error details" in the errors items. These details cause the duplicated message.
To fix this, I see two options:
Have webpack-dev-server use .toJson({ errorDetails: false })
or let the .toJson() method default to errorDetails = false.
I think option 1 is the most safe one, so I'll fix this in WDS.
I'm submitting a bug report
Webpack version:
1.13.2
Please tell us about your environment:
OSX
Current behavior:
Errors in the browser console appear duplicated, regardless of the loader:
Expected/desired behavior:
The error message should not be printed twice.
npm i -g create-react-app create-react-app mystuff --scripts-version 0.5.1 cd mystuff npm start
Then make a syntax error in
src/App.js
orsrc/App.css
and inspect browser output.You can find the config here.
The error message should not be printed twice.
Seeing it printed twice is confusing and annoying.
(I file this in Webpack repo because the error string is passed to WDS already in this form.)
The text was updated successfully, but these errors were encountered: