-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Documentation lacks server.hmr.server config parameter #3587
Comments
|
Yes, I'd be glad to create the PR. I'll also add a short description of the option. Thanks for the prompt reply! |
* docs(hmr): document hmr.server option * docs(hmr): hmr.server apply suggestions
This issue has been locked since it has been closed for more than 14 days. If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion. |
Describe the bug
The documentation for server.hmr configuration specifies the following options:
boolean | { protocol?: string, host?: string, port?: number, path?: string, timeout?: number, overlay?: boolean }
It appears to lack theserver?: Server
option.Is this option internal to Vite, or is it intended to be used as explained below? If intended for public use, perhaps the documentation could explain its usage.
In vite/src/node/server/ws.ts, there is a reference to the hmr.server option. When Vite runs in middlewareMode, the server object can be passed via this option (in this case, SvelteKit). This allows a secure web socket connection,which uses https:// for certificate validation, to 'piggyback' onto the specified server.
This option is useful for of self-signed certificates -- The acceptance of the certificate will allow both https// and wss:// connections to proceed.
Reproduction
No repo. Documentation only.
System Info
Used package manager: Not applicable
Logs
Not Applicable
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: