How do you setup hot code reload with shadow-cljs
in Keechma?
I am using shadow-cljs
as build tool and code is not being loaded to browser when I save file after changes.
So, I have to press reload button of browser to see results and effects.
UI behaves same way after changes. (to make it behave in new(changed) way browser reload button is needed to be pressed)
I just noticed that when I make changes and save the core.cljs
file in which app-definition/app-config
is defined and app is mounted, changes are loaded to the browser automatically. (even ones I did in other namespaces.)
@ahmed1hsn AFAIK there were some issues with shadow-cljs not reloading transitive dependencies. This is not a keechma related issue, but it works differently than figwheel
I was using shadow-cljs only for node projects, I’m using classic figwheel for all projects I’m working on
Is there any possible workaround or should I move to figwheel-main
?
I'm using shadow-cljs
because it's simple and interop with npm libs is painless.
@ahmed1hsn not sure. I’m not even using figwheel-main, just figwheel (although I did test figwheel and it was working ok). For npm libs I’m using this setup: https://github.com/retro/protok-frontend/blob/master/project.clj https://github.com/retro/protok-frontend/blob/master/src/js/index.js https://github.com/retro/protok-frontend/blob/master/Makefile#L18 We’re using it on all our projects and it works flawlessly
actually easy to make it work with shadow-cljs
i personally prefer it to figwheel-main