Fork me on GitHub
#shadow-cljs
<
2021-08-28
>
thheller06:08:59

they should most definitely change after restarting the server. you can even skip restarting the server and just touch node_modules/your-lib/package.json

thheller06:08:17

FWIW the check whether a file was modified only uses the last modified timestamp, so make sure those actually change

Jakub Holý (HolyJak)12:08:45

Hello! What do I need to override a dependency with a local one, and the changes visible in the UI (i.e. frontend code)? What I did is have, in my global ~/.clojure/deps.edn this alias:

:dev/fulcro-rad {:override-deps {com.fulcrologic/fulcro-rad {:local/root "/Users/me/Projects/external/fulcro-all/fulcro-rad"}}}
and then I simply added it to shadow-cljs.edn :
{:deps     {:aliases [:dev :test :sql :dev/fulcro-rad]}
I restarted npx shadow-cljs watch main but it seems that the modified code from the local override is not used there. So what else do I need to do? Remove some caches, ...? (The browser has dev tools open and "no cache if dev tools" enabled.) 🙏 Do I perhaps need to run frontend build in the dependency?

Yehonathan Sharvit18:08:28

I have a Cljs library (klipse-clj) and I'd like to package it as an npm module to be consumed both in node and in the browser. I am using :target :node-library and shadow-cljs compile and it works perfectly for node. What am I supposed to do in order to bundle the lib as a single JavaScript file for the browser?

thheller19:08:26

what do you mean by "for the browser"? as is loaded direclty in the browser or after processing by some other bundler (eg. webpack)?

Yehonathan Sharvit19:08:32

Loaded directly in a <script> tag