-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Hey 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?