<!-- Please don't delete this template otherwise your issue will be closed immediately --> <!-- Before creating an issue please make sure you are using the latest version of webpack. --> ### Bug report <!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. --> <!-- https://github.com/webpack/webpack/discussions --> <!-- https://stackoverflow.com/questions/ask?tags=webpack --> <!-- https://gitter.im/webpack/webpack --> <!-- Issues which contain questions or support requests will be closed. --> ### Actual Behavior <!-- Explain exactly how it behaves --> Overlay by thrown error at initial load is closed immediately. https://github.com/webpack/webpack-dev-server/assets/48552260/5f8184b4-60d5-4fc3-ba2c-c1cbb715cada #### With debugger mode https://github.com/webpack/webpack-dev-server/assets/48552260/deda2386-87e2-4965-a6ef-a5a60134b527 ### Expected Behavior <!-- "It should work" is not a helpful explanation --> <!-- Explain exactly how it should behave --> Overlay by thrown error at initial load is **not** closed immediately. ### How Do We Reproduce? <!-- A great way to do this is to provide your configuration via a GitHub repository --> <!-- The most helpful is a minimal reproduction with instructions on how to reproduce --> <!-- Repositories with too many files or large `webpack.config.js` files are not suitable --> <!-- Please only add small code snippets directly into this issue --> <!-- https://gist.github.com is a good place for longer code snippets --> <!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead --> Just edit like below the photo to the overlay-example code. https://github.com/webpack/webpack-dev-server/blob/v4.15.1/examples/client/overlay/app.js#L49 <img width="1231" alt="image" src="https://github.com/webpack/webpack-dev-server/assets/48552260/d2be81c7-dfc4-45c4-ab8f-f81a9f180072"> ### Please paste the results of `npx webpack-cli info` here, and mention other relevant information ``` System: OS: macOS 13.4.1 CPU: (10) arm64 Apple M1 Max Memory: 89.55 MB / 32.00 GB Binaries: Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node Yarn: 3.6.4 - ~/.nvm/versions/node/v16.14.0/bin/yarn npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm Browsers: Chrome: 120.0.6099.109 Safari: 16.5.2 Global Packages: webpack-dev-server: 4.15.1 ```
Bug report
Actual Behavior
Overlay by thrown error at initial load is closed immediately.
Untitled.mov
With debugger mode
bb9da7dd-05be-48da-8623-67247ab07fa2.mp4
Expected Behavior
Overlay by thrown error at initial load is not closed immediately.
How Do We Reproduce?
Just edit like below the photo to the overlay-example code. https://github.com/webpack/webpack-dev-server/blob/v4.15.1/examples/client/overlay/app.js#L49
Please paste the results of
npx webpack-cli infohere, and mention other relevant information