Fork me on GitHub

Hi there! I’ve picked up a side project and started using awesome ShadowCLJS again. I’m trying to figure out something but I’m having a hard time. I’m hoping someone here can give some advice. I’m building a :browser target for use in an iOS / Android web view. On iOS I have it working. On Android there’s the issue however that Android has as IP address of the host running the development environment, not localhost. So what I’m observing is that the initial load of my compiles JS bundle is working (because I load it from, but then ShadowCLJS tries to connect to localhost. I’ve tried setting :devtools-url` to , but then the websockets upgrade doesn’t work (“error during websocket handshake: unexpected response code: 200”). I have the feeling that it should be possible somehow, but how…? Thanks for any help / pointers!


While ruminating this over breakfast, I realized that I already knew the solution, just didn’t think of it at the right time. Like the manual says, :devtools-url should point to the primary server. So it should have been . After changing that it worked. 🎉

👍 3
Alexis Vincent13:12:02

@thheller Thanks, useful to see. I’ll play around with :esm and see what I can get going.

Alexis Vincent13:12:42

What is supported by :browser but not by :esm ?

Alexis Vincent13:12:31

What are the 2 PR’s going to allow for? Will they enable mograting away from goog.provide ?


the output will look like :esm currently but a little cleaner I guess. goog.provide is never part of an optimized build so I'm not sure what you mean. CLJS will continue to use that for a while.


@thheller is there a way to access the lein project name/version programmatically from within the app?


for instance, in jvm clojure, I can do (System/getProperty "attribute-service.version")`


is there a parallel in cljs you are aware of?


a macro I guess

Alexis Vincent15:12:14

Is there any reason I should use browser over esm for browser target?


esm is experimental and unfinished. browser is stable and used by many.


you don't gain much by using esm imho