-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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(server): recover server.ws.clients.send
API changes for back compatibility
#18779
Conversation
I am not sure this was done by mistake, the payload in channels should now be always normalized 🤔 |
The PR that changes how hot channels work: #18362 I think one of the goals was to make it easier to work from the outside to remove the |
Ah I see. I get the clients by |
I didn't expect to break things on |
Thanks! Indeed, that makes more sense! This PR doesn't seems to fully solve my case on vite-plugin-inspect yet, I will keep investigating and send other PRs if any |
After some digging, I found the problem is that in that in L27 uses While L22 compared the matched source with the new branch, the hot client always gets normalized; thus, the instances are different. And during the normalization, vite/packages/vite/src/node/server/hmr.ts Lines 233 to 254 in e26acf4
I will come up with an alternative PR to propose the fix |
Raised #18781 |
Closing as #18782 has been merged |
During refactoring of Environment API, I think we mistakenly change the
send
signature onWebSocketClient
, causing a breaking regression:Vite 5:
vite/packages/vite/src/node/server/ws.ts
Lines 65 to 72 in 81e6c04
Vite v6.0.0 (WebSocketClient extends HotChannelClient):
vite/packages/vite/src/node/server/hmr.ts
Lines 78 to 80 in c7b3308