Email or username:

Password:

Forgot your password?
Nolan Lawson

Reading up on how Hot Module Replacement actually works, and it's sort of confirming my suspicion that it's not really worth the trouble. github.com/rixo/svelte-hmr#wha

There are so many caveats and edge cases, and it turns out you need to make your module "HMR-ready" by adding annotations or custom code. This can work out-of-the-box for some component frameworks, but it seems to me that on a non-trivial app, it just takes one module to mess everything up. Maybe refreshing is not so bad?

1 comment
Darius Kazemi

@nolan I almost wonder if setting up some kind of OS-level keyboard macro that reloads the browser when you press a key combo wouldn't be easier to set up and 90% of the benefits

(also I am really suspicious when it comes to layout changes in particular being rendered correctly in a hot-reload situation)

Go Up