Hi, wondering if someone knows of a way to hot reload locally-installed NPM packages (installed via npm install --no-save ../path/to/lib or npm link) in shadow-cljs. I'm using a personal TypeScript UI library from a shadow-cljs app and I'd like to be able to make changes to it locally and see them in my shadow-cljs app, without having to restart the shadow-cljs server. I found https://github.com/thheller/shadow-cljs/issues/759 but it has been closed for some time
Yeah sorry, I was just throwing it out there to see if you noticed something similar, since it's mostly to do with the recompilation on npm package.json changes. Hot reload of cljs files is almost as fast as before, it's the recompilation on package.json modifications which is a bit laggy (~3-4s more than a normal recompilation). Will do a bit more digging next week and report back. Cheers
Hi @thheller would it be possible to limit the watch of package.json to only certain packages under node_modules/
I've noticed that on 3.3.6 recompiles are a bit slower so I assumed it might be due to it watching over all packages
define a bit slower? and is it actually recompiling files from node_modules/? otherwise I don't see how this would slow down anything
also you said you were on 3.2.1 before, so what makes you say it was the 3.3.6 update specifically?
> However shadow-cljs still checks the package.json files of the packages and if those are modified will trigger a re-compile. So it will still detect new npm install versions. So you could touch node_modules/your-package/package.json after making changes in your JS?
that should still work. which version are you using? it was broken for a while
3.2.1
> So you could touch node_modules/your-package/package.json after making changes in your JS? I just tried this but nothing happened. I have to recompile/restart the server for the changes to have effect
hmm yeah the npm reload didn't work at all. fixed it in 3.3.6. still just watching the package.json files though, but touching them should now invalidate and recompile the entire package
Can confirm it now works fine 👍 thanks a lot!