-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMR plans? #3632
Comments
I've published a fork of Since it has access to the whole compiler's output ( For the future: do you think it's preferable to have a bundler plugin dedicated only to HMR support for Svelte components, or a single plugin that does both compile + HMR like the one I've just posted -- and like official |
@rixo I just wanna say thank you! Your app template is exactly what I was looking for! |
@shybyte Thanks! Nice to hear some feedback :) So, to answer my own question, I deprecated the HMR only plugin in favor of the integrated rollup-plugin-svelte-hot. The plugin now features HMR support not only with Nollup, but also with... Rollup itself! Still very very experimental this one though. It uses WIP rollup-plugin-hot. For people willing to beta test HMR, please give it a shot! See updated svelte-template-hot for details & example. |
Thanks @rixo, I was looking for this issue :) |
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). |
Closing this as I think we should be documenting this in the community site for now, in order to grow the HMR userbase, with a view to HMR becoming an official part of Svelte (as per the roadmap). Thanks for your hard work @rixo ! |
Hello, TBH, one of the main selling point of Svelte being the "speed" concerns (small bundle so fast download, without framework runtime so faster execution, etc..) the HMR feature is a very important part of this feeling IMHO. I was immediately convinced by Svelte when I first heard of it (and ultimately when I saw Rich's famous Reactivity talk), but until now I didn't have the opportunity to work with.. But I'm currently testing a small app with Svelte and somehow I find the whole process very slow.. And in the current workflow it takes easily 1 to 2s for the browsers to load upon livereload.. But, you know, programmer happiness etc.. Those are really 2 annoying seconds.. Thank you! |
@antony could you merge sveltejs/integrations#31 then? |
@benmccann I'm more of a triager than a merger, but I'll try to get it in front of the right people :) |
@antony shouldn't this become part of svelte's main plugins? HMR is a pretty important feature for devs to improve productivity |
@DominusVilicus it's not as simple as that. I can assure you that it is work in progress, however. |
1 year has passed since this issue was first posted, how are we coming along with integrating this into main svelte releases? |
@ZaDarkSide you can read the RFCs, study rixo's work, and engage with the community to keep track of the HMR progress. |
Well for me this feature seams to be stuck in development hell, people really need it to be productive... |
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
andd
, and transferringcallbacks
,bounds
,$$slots
and context.So, what do you think? Are you interested in moving this forward?
The text was updated successfully, but these errors were encountered: