Please improve config documentation for server.hmr.server
See original GitHub issueClear and concise description of the problem
In https://vitejs.dev/config/#server-hmr it is said:
When using server.middlewareMode or server.https, assigning server.hmr.server to your HTTP(S) server will process HMR connection requests through your server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port.
But it’s unclear and nowhere else described what “assigning server.hmr.server to your HTTP(S) server” would look like in the actual config file.
Suggested solution
Please add a code snippet of the actual final configuration:
server: {
host: true,
port: 8015,
https: true,
hmr:{
server: what are the options and syntax here?
}
}
}
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Hot Module Replacement - webpack
All we need to do is update our webpack-dev-server configuration, and use webpack's built-in HMR plugin. We'll also remove the entry point for...
Read more >Configuring Vite
When running vite from the command line, Vite will automatically try to resolve a config file named vite.config.js inside project root.
Read more >Hot Module Replacement - webpack 3 documentation
All we need to do is update our webpack-dev-server configuration, and use webpack's built in HMR plugin. We'll also remove the entry point...
Read more >Integrated Dev Server Config - Stencil.js
By integrating the build process and the dev server, Stencil is able to drastically improve the development experience without requiring complicated build ...
Read more >Hot Module Replacement in Redux - Toptal
We only include those settings essential to support HMR, making you easy to ... If we are using webpack-dev-server, then we need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, then I will stick with webpack and suggest to anybody I know to do the same due to rude and careless vite community.
@Tech-Nomad I’m sorry you felt that your suggestion wasn’t taken into account, but the fact that two maintainers took the time to read through your issue and evaluate if the docs should be extended or not should show you that it isn’t the case. As they explained already, the Vite documentation can’t contain an explanation for all possible use cases. We need to work with other communities so they include sections about Vite for example to be able to scale. Closing this issue now as I don’t think this discussion is constructive. You are free to use other tools if they work better for you.