-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: error overlay message escape #12305
Conversation
🦋 Changeset detectedLatest commit: f6dc9c2 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I pushed an alternative fix, I'm not 100% sure of what I'm doing. It seems like on HMR upgrade, if any of the Vite processing thingy fails, Vite emits an error through the websocket that doesn't go through any of our usual error stuff. My method patches the .send method directly, but perhaps there's another way to do this properly? cc @bluwy I'll note that Vite lose a lot of information from errors when doing this, so trying to enhance might not even be relevant in the first place as we can't achieve much. |
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.
Fix looks good to me. Since any kind of errors can come through viteServer.hot.send()
, as long as we normalize it to escape HTML, or handle it in the overlay code, it should be fine.
Changes
Testing
Manual
Docs
N/A