Skip to content

Commit

Permalink
docs(hmr): document hmr.protocol setting (#16056)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanhu committed Mar 1, 2024
1 parent aac2ef7 commit ee56207
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/config/server-options.md
Expand Up @@ -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.

`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.

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.
Expand Down

0 comments on commit ee56207

Please sign in to comment.