Add option to disable full reload (hot only)
See original GitHub issueClear and concise description of the problem
I’m developing an app that renders some large forms. Hot module reload is great for this, but full page reloads are quite annoying, because they cause the form state to be lost whenever I edit some unrelated file, and they cause the beforeunload
handler to trigger when I save a file, causing the browser to steal the focus. Generally, I personally find full page reloads rather undesirable and annoying, while I find hot module reloads really amazing and helpful.
Suggested solution
I would like to have an option to disable full reloads all together, but keep hot module replacement enabled, similar to webpack’s hot only option.
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:2
- Comments:17 (7 by maintainers)
Top Results From Across the Web
How to disable webpack dev server auto reload?
With this setup webpack dev server opens the initial page as localhost:9005/webpack-dev-server/ with auto reload on ( iframe mode).
Read more >How to disable Hot Reload for ASP.NET Core projects.
The one workaround is to change the “Auto build and refresh option” to None. This will turn off hot reload, but unfortunately it...
Read more >Webpack's Hot Module Replacement Feature Explained
The webpack-dev-server will then refresh the browser to download a new bundle.js file. This behavior can be disabled by adding hotOnly: true ...
Read more >Hot Module Replacement - webpack
It allows all kinds of modules to be updated at runtime without the need for a full refresh. This page focuses on implementation...
Read more >Hot Reloading | figwheel-main
If you want to disable this you can set the :broadcast-reloads option to false . Figwheel is careful about which clients are able...
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
I second that. Vite is now doing full page reloads and we do not understand why.
Is there at least some debug info which can say why the full page refresh happens?
Personally I would still prefer a configuration option, since I think it is common to want to disable full reloads, so it shouldn’t involve having to add some internal API calls to the frontend code. But the suggested solution works for me, so at least my use case is solved.