Fork me on GitHub
Ahmed Hassan11:07:53

How do you setup hot code reload with shadow-cljs in Keechma?

Ahmed Hassan11:07:51

I am using shadow-cljs as build tool and code is not being loaded to browser when I save file after changes.

Ahmed Hassan11:07:47

So, I have to press reload button of browser to see results and effects.

Ahmed Hassan12:07:28

UI behaves same way after changes. (to make it behave in new(changed) way browser reload button is needed to be pressed)

Ahmed Hassan12:07:35

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

Ahmed Hassan12:07:39

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: 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