HMR plans?
See original GitHub issueHey guys!
I’ve been working on a HMR implementation this summer, building upon the one for v2 in svelte-loader
(my clone, demo).
It supports svelte-native
(demo) and works in Sapper + Webpack (where I’ve been using it the most).
I’ve also just added support for Nollup (plugin, demo). (Would love to do Sapper + Nollup.)
I haven’t got much feedback yet, but I run a small test suite on it (with Puppeteer) and it seems to support about every feature of Svelte that I know (apart from transitions maybe, haven’t really tested them yet). With Nollup, it has delicious error resilience!
What’s the catch? It runs on emulated dev hooks that mess a little bit with the private $$
API. But a few more utilities like $capture_state
/ $inject_state
could address this. There’s not so much needed. In essence, it’s just hooking on components’ m
and d
, and transferring callbacks
, bounds
, $$slots
and context.
So, what do you think? Are you interested in moving this forward?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:41
- Comments:14 (8 by maintainers)
Well for me this feature seams to be stuck in development hell, people really need it to be productive…
Update: I’ve put the links to all my HMR related projects (plugins, templates) in this readme. If you want to try HMR before official support, your best place to start is there.
If you need help with getting started, you’re welcome to drop me a line on Discord or issue (report HMR issues there, not here, since it is not officially supported currently).