-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not show full screen error dialog for syntax errors and HMR #13220
Comments
I think this is a good idea. We may need to introduce a new option to let people choose the overlay style. For reference, we started to discuss about the need for alternative error overlay designs in the context of runtime errors before: #6274 (comment) |
You could also disable the error overlay with server.hmr.overlay to hide it entirely. The errors will still be shown in the terminal. I'm not really sure if we need to maintain a separate overlay style for this case, ideally Vite should stick to one. Maybe we could consider redesigning it in a next major if a less intrusive overlay is more desirable. (but I feel like the current one is also fine) |
That is a good point. I completely overlooked setting |
Closing this in favour of |
For future reference, the next VS Code version will have |
Description
I auto-save while typing in VS Code with a 30ms debounce delay. When I have VS Code and my browser side-by-side, the error dialog flashes a lot while typing because in-progress typing usually contains syntax errors. This can be a jarring and distracting experience, especially since VS Code already highlights syntax errors.
Suggested solution
Show a smaller secondary banner near the window edges when an HMR update cannot be applied due to a syntax error.
Alternative
Do not process HMR updates when there are syntax errors and silently hide them – this may be confusing to some people.
Additional context
This was discussed on Discord and it was recommended that I create an issue for it.
Validations
The text was updated successfully, but these errors were encountered: