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.

Add option to disable full reload (hot only)

See original GitHub issue

Clear 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
tomitrescakcommented, Feb 8, 2022

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?

1reaction
cdauthcommented, Mar 16, 2022

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.

Read more comments on GitHub >

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

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