fix(client): prevent overlay from closing immediately on runtime error at initial load by kehach07 · Pull Request #5653 · webpack/webpack-dev-server

…r at initial load

Summary

What kind of change does this PR introduce?

Did you add tests for your changes?

Does this PR introduce a breaking change?

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Use of AI

Fixes an issue where the error overlay was closed immediately when a runtime error occurred during the initial page load.

Previously, the overlay was dismissed by socket events such as invalid, still-ok, and ok, even when a runtime error existed. This caused the runtime error overlay to disappear instantly, making debugging difficult.

This change tracks runtime errors and prevents the overlay from being dismissed until the error is resolved.

Issue: #5024