Skip to content

Commit

Permalink
docs(hmr): document hmr.server option (fix vitejs#3587) (vitejs#3590)
Browse files Browse the repository at this point in the history
* docs(hmr): document hmr.server option

* docs(hmr): hmr.server apply suggestions
  • Loading branch information
JBusillo authored and ygj6 committed Jun 1, 2021
1 parent 6085eeb commit 18de9ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,17 @@ export default async ({ command, mode }) => {

### server.hmr

- **Type:** `boolean | { protocol?: string, host?: string, port?: number, path?: string, timeout?: number, overlay?: boolean, clientPort?: number }`
- **Type:** `boolean | { protocol?: string, host?: string, port?: number, path?: string, timeout?: number, overlay?: boolean, clientPort?: number, server?: Server }`

Disable or configure HMR connection (in cases where the HMR websocket must use a different address from the http server).

Set `server.hmr.overlay` to `false` to disable the server error overlay.

`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. Useful if you're using an SSL proxy in front of your dev server.

When using `server.middlewareMode` and `server.https`, setting `server.hmr.server` to your HTTPS server will process HMR secure connection requests through your server. This can be helpful when using self-signed certificates.


### server.watch

- **Type:** `object`
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2953,7 +2953,7 @@ Repository: [email protected]:teambition/merge2.git

## micromatch
License: MIT
By: Jon Schlinkert, Amila Welihinda, Bogdan Chadkin, Brian Woodward, Devon Govett, Elan Shanker, Fabrício Matté, Martin Kolárik, Olsten Larck, Paul Miller, Tom Byrer, Tyler Akins, Peter Bright
By: Jon Schlinkert, Amila Welihinda, Bogdan Chadkin, Brian Woodward, Devon Govett, Elan Shanker, Fabrício Matté, Martin Kolárik, Olsten Larck, Paul Miller, Tom Byrer, Tyler Akins, Peter Bright, Kuba Juszczyk
Repository: micromatch/micromatch

> The MIT License (MIT)
Expand Down

0 comments on commit 18de9ec

Please sign in to comment.