Fork me on GitHub

@thheller while using shadow-cljs in embedded mode, I want to redef the request-handler without restarting the server and build processes. Is there any way to do that?


I think the problem is that the server closes over the value of the handler instead of keeping the var around.


Since I’d be making new endpoints all the time it would be unfortunate and is unnecessary to have to recompile every time.


which request-handler? the one for the build? you could either set :http-handler that just delegates to the var you want to switch.


or use your own webserver to begin with. shadow-cljs really doesn't need anything special from the dev-http servers


@U050CJFRU sorry misunderstood what you were asking. fixed in 2.2.25. the var is now deref'd when the request happens not when starting the server. so any updates should be reflected immediately.


@thheller you’re killing it! This is so much fun!


@thheller hi, if I might make a suggestion regarding the shadow-cljs hud: Perhaps you can set z-index to a high value like 10000 to ensure that it stays on top of other absolutely positioned elements?


thought that was already done but didn't do it for all elements. will add it to all.


fixed. will be in next release.

parrot 8

When starting a repl with shadow-cljs node-repl, is it possible to connect via another nrepl client? What would to port be? I want to start a node repl without having to set up build config, and then connect to it via cider.


No worries, seems to work when I connect to existing shadow-cljs server via cider and then call (shadow.cljs.devtools.api/node-repl).


@mjmeintjes it also works properly now if you just run (shadow.cljs.devtools.api/node-repl) without running shadow-cljs node-repl first.


@thheller Thanks, that works great.


One thing I'm struggling with - when I have a :node-script target, I can start the compiled js file using node, and then connect to the nrepl using cider. However, I can't figure out how to make println statements output to the repl. When I call println, it prints in to console where I started the node js script. I would like it to print within the repl. Does that make sense? Is it possible?


Hey! Is there way to import/require non-js dependencies just like webpack?