fix: allow using vite as a proxy for another vite server#13218
fix: allow using vite as a proxy for another vite server#13218patak-cat merged 3 commits intovitejs:mainfrom
Conversation
|
|
9b2d08f to
a32c182
Compare
a32c182 to
44f9370
Compare
44f9370 to
8887562
Compare
|
Would you explain your use case? Why is this feature needed in your setup? |
The test case that I have included in this PR is basically a very simple reproduction of what we actually do. |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
sapphi-red
left a comment
There was a problem hiding this comment.
I thought this is similar with vitejs/vite-plugin-vue#21. But actually this was different from that one.
I think this won't cause any issues for others. 👍
|
@sapphi-red @patak-dev Thank you for reviewing and merging my PR! |
Description
The goal of this PR is to allow using vite as a proxy for another vite server, with HMR still working for the upstream server.
Additional context
Currently vite prevents any websocket connection with the
vite-hmrwebsocket protocol from being forwarded to another server. I think it is not correct, vite should only handle itself the connection if it has the correct URL (in addition to the correct websocket protocol), and it should be able forward websocket connections to another server whatever the protocol it uses.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).