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
Before webpack5, react-error-overlay used to show up only on errors and not on warnings
But the newer webpack backed error overlay shows up on both errors and warnings
Steps to reproduce
setup a CRA app with next version of react-scripts
do a change that triggers a compile warning
notice the overlay
Expected behavior
Dunno if this was an intentional change,
previously overlay was not shown on warnings (screenshot for 4.0.3)
Actual behavior
Now overlay is shown on warnings
(screenshot for 5.0.0-next.31)
diff --git a/node_modules/react-scripts/config/webpackDevServer.config.js b/node_modules/react-scripts/config/webpackDevServer.config.js
index 1be01b1..8e71550 100644
--- a/node_modules/react-scripts/config/webpackDevServer.config.js+++ b/node_modules/react-scripts/config/webpackDevServer.config.js@@ -81,7 +81,10 @@ module.exports = function (proxy, allowedHost) {
pathname: sockPath,
port: sockPort,
},
- overlay: true,+ overlay: {+ errors: true,+ warnings: false,+ },
},
devMiddleware: {
// It is important to tell WebpackDevServer to use the same "publicPath" path as
The text was updated successfully, but these errors were encountered:
Describe the bug
Before webpack5, react-error-overlay used to show up only on errors and not on warnings
But the newer webpack backed error overlay shows up on both errors and warnings
Steps to reproduce
next
version of react-scriptsExpected behavior
Dunno if this was an intentional change,
![Screenshot_20210901_163948](https://user-images.githubusercontent.com/15520960/131661423-9c8c96fd-9606-4f99-988c-7e6c2d0499a9.png)
previously overlay was not shown on warnings (screenshot for 4.0.3)
Actual behavior
Now overlay is shown on warnings
![Screenshot_20210901_145748](https://user-images.githubusercontent.com/15520960/131661072-71bc803d-2831-48ca-8b1f-4bd27018399a.png)
(screenshot for 5.0.0-next.31)
Reproducible demo
I've setup a minimal repro here -> https://github.com/jawadsh123/cra-overlay-bug
It's simply a fresh CRA app with a simulated warning
Possible solution
I've been able to get the earlier behavior by changing this part of webpack config -> https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/config/webpackDevServer.config.js#L84
The text was updated successfully, but these errors were encountered: