-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
fix: show error if vite client cannot be loaded #17419
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
Conversation
|
|
9cb1c1c to
609d437
Compare
|
I feel we could improve the DX by having the error overlay support a "standalone" mode or "non-dismissable" mode? That way the error overlay is non-dismissable (as there's no reason so), and if they accidentally clicked outside, they won't get a lousier UI. I also think we should only render the fallback error if the error overlay fail to load? We should also add an additional message that the error overlay failed to load. |
|
Those sound like reasonable ideas, but are all more complicated to implement and are just UX niceties. Maybe we could move ahead with this to fix the core issue of having a blank page and then file an issue for the followup ideas |
|
I don't think the issue is urgent enough that we should go ahead with this middleground, since the error can be viewed from the terminal too? So I'm leaning on doing a proper fix instead 😬 |
609d437 to
1f774b2
Compare
I made both of these changes
This part really feels separate to me. The current PR is purely an improvement over the current state. In the cases where there previously was a blank page we're now showing an error and in the cases where the overlay was rendering it's exactly the same. I do like the idea of a non-dismissable mode, but think we could handle that in a separate PR |
|
Thanks! Yeah fair we can handle that separately 👍 |
patak-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should merge this one so the issue is fixed, and we can improve it later on
|
Thank you @bluwy. I appreciate you taking the time to look at this and make additional improvements! The changes you made look good to me |
patak-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!

Description
fixes #17418
Ensure that we show an error if
/@vite/clientcannot be loaded. Prior to this PR the error handler worked only with post middlewares. Now it works with all middlewares