question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please improve config documentation for server.hmr.server

See original GitHub issue

Clear 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
FullStackAlexcommented, Mar 4, 2022

Ok, then I will stick with webpack and suggest to anybody I know to do the same due to rude and careless vite community.

0reactions
patak-devcommented, Mar 4, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found