Fork me on GitHub
#shadow-cljs
<
2023-12-05
>
ullrich10:12:35

Are there any workarounds for reloading NPM modules that have been linked (eg via yarn link) other than touching the package.json as described in https://github.com/thheller/shadow-cljs#759? I found other folks running into the same issue (https://github.com/thheller/shadow-cljs#1121) and am wondering what I could do to speed up my workflow and iteration speed instead of restarting shadow after each change (which forces me to reconnect my repl as well 😞) gratitude-thank-you

thheller14:12:07

whats the problem with touching package.json?

thheller14:12:27

can you not just do that as part of the build process of the JS side?

thheller14:12:55

I'm not familiar with what yarn link does in particular

ullrich16:12:00

Touching package.json does not trigger any reload and we still execute the old JS code. It might be our setup though which is a bit complicated. • Main project with shadow-cljs • library project that uses an NPM module (required via deps.edn and package.json to transiently include the NPM module) • the NPM module we want to link I’ll try and create a small repro setup to isolate where things go wrong and update issue 1121 (linked above) if I find anything.

Zed19:12:17

Hi, I'm currently experimenting with code splitting and shadow.lazy and I've discovered that some tests that depend on the lazily loaded module are failing because they aren't waiting for the module to load. Is converting my tests to use cljs.test/async what I have to do, or is there some other alternative?

thheller19:12:23

well tests won't be code split, so technically there is no module loading, but it still needs async

Zed19:12:50

That makes sense, thank you