mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
docs(hmr): document hmr.protocol
setting (#16056)
This commit is contained in:
parent
aac2ef7752
commit
ee562070f2
@ -152,6 +152,8 @@ Disable or configure HMR connection (in cases where the HMR websocket must use a
|
|||||||
|
|
||||||
Set `server.hmr.overlay` to `false` to disable the server error overlay.
|
Set `server.hmr.overlay` to `false` to disable the server error overlay.
|
||||||
|
|
||||||
|
`protocol` sets the WebSocket protocol used for the HMR connection: `ws` (WebSocket) or `wss` (WebSocket Secure).
|
||||||
|
|
||||||
`clientPort` is an advanced option that overrides the port only on the client side, allowing you to serve the websocket on a different port than the client code looks for it on.
|
`clientPort` is an advanced option that overrides the port only on the client side, allowing you to serve the websocket on a different port than the client code looks for it on.
|
||||||
|
|
||||||
When `server.hmr.server` is defined, Vite will process the HMR connection requests through the provided server. If not in middleware mode, Vite will attempt to process HMR connection requests through the existing server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port.
|
When `server.hmr.server` is defined, Vite will process the HMR connection requests through the provided server. If not in middleware mode, Vite will attempt to process HMR connection requests through the existing server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port.
|
||||||
|
Loading…
Reference in New Issue
Block a user