Fork me on GitHub
#shadow-cljs
<
2019-06-20
>
Chris O’Donnell00:06:03

Just want to say that it is totally awesome that shadow-cljs automatically recompiles and hot reloads in the browser when you change a dep brought in via deps.edn's :local/root.

☝️ 4
👍 8
steveb8n10:06:14

likewise it’s awesome that it doesn’t need a restart when you add a new npm dep and install it in the background

David Pham17:06:18

Is it possible to run Kamera with shadow-cljs?

Marcin18:06:23

Hey all, what do you usually do when you want to have on your frontend app a separate configuration for dev (e.g. using links like localhost:8080 instead of prod services) and a different one for production?

Marcin19:06:22

@deadghost I thought about it, but it won’t work that well with websockets, like wss://

Marcin19:06:02

that’s what I thought. Thank you @thheller!

neupsh19:06:08

I have shadow-cljs watch app running, and I am making changes in the code. When I make changes in the existing namespaces, they get reloaded automatically but when I create a new namespace and require them in the existing namespace, i get the following error:

The required namespace "<new namespace>" is not available, it was required by "<existing ns>.cljs"

neupsh19:06:47

is it normal to re-run that everytime i add a new namespace?

neupsh19:06:01

(I am using shadow-cljs expo template if it matters)

thheller19:06:10

no, that should work as expected

thheller19:06:47

there might be a race condition if for some reason the new file is saved way after (500ms+) the existing file

thheller19:06:03

ie. the existing file is saved, then some time passes, then the new one is saved

neupsh19:06:19

@thheller looks like the new file is not even "watched" at all. I made edits only one the new file now (the existing has the new namespace required which resulted in the failure mentioned above) and saved it but no activity on the shadow-cljs ouput

neupsh19:06:03

is there a way to see logs to figure out whats going on here?

neupsh19:06:28

or a way to force reload the files without exiting shadow-cljs?

thheller19:06:39

if you use a separate shadow-cljs server process you can just restart the watch

thheller19:06:54

:log {:level :debug} will print a bunch of stuff

👍 4
neupsh19:06:42

i will try those.. thanks a lot

thheller19:06:22

make sure you are on a somewhat recent version too. there was a related bug a year ago or so

neupsh19:06:22

@thheller i see correct behavior when i run shadow-cljs server and select the build from the web interface. May be it was one off issue. I will keep an eye on it