This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (11)
- # beginners (98)
- # boot (2)
- # cider (3)
- # clara (3)
- # cljs-dev (15)
- # cljsrn (2)
- # clojure (122)
- # clojure-austin (4)
- # clojure-russia (1)
- # clojure-spec (2)
- # clojurescript (30)
- # css (6)
- # cursive (5)
- # docs (1)
- # fulcro (4)
- # hoplon (118)
- # keechma (3)
- # leiningen (5)
- # lumo (1)
- # off-topic (28)
- # onyx (6)
- # re-frame (4)
- # reagent (1)
- # reitit (1)
- # shadow-cljs (53)
- # sql (1)
- # unrepl (1)
Can't seem to get autoload working, hosted from http://localhost:3000. I see my browser connect to http://localhost:9630/ws/worker/app/f02d4ea2-71cd-418f-8f6a-888ea31e9846/c809ecc7-6d24-48d2-848e-89636113d1d0/browser (and the 9630 server is running!). In my console log I see:
Immediately after one another.
DEVTOOLS: connected! browser.cljs:25:10 DEVTOOLS: disconnected! browser.cljs:25:10
Looks like my lack of logger is causing any log messages to end up in the void, so I'll rectify that first
user=> [XNIO-1 I/O-3] WARN there we are. Something to work with!
I'm struggling with using reagent/rum, I think due to their dependency on cljsjs.react. I'm getting
The required JS dependency "react" is not available, it was required by "cljsjs/react.cljs". Is there a config or something I need to use?
@dominicm shadow-cljs uses npm not cljsjs. so you need to
npm install react react-dom create-react-class
the systems don’t mix well so you’d either need to use cljsjs for everything or nothing
sure. Catches for me are: * we already have code using cljsjs * how do you work with supporting libraries that only work with cljsjs?
I also have a difficulty for my particular setup now, which is that I need to figure out how to "merge" npm dependencies, I can't rely on the classpath anymore.
I would probably recommend creating a
/cljs directory in your monorepo with
/cljs/package.json for npm and
I really would not recommend running shadow-cljs in your JVM alongside the JVM stuff
that is just going to be annoying and nullifies all optimizations I’m doing for shadow-cljs
Oh, there's something additional to cljs/clj dependencies conflicting? What is the problem?
shadow-cljs has a bunch of dependencies and I don’t guarantee anything if you override those
eg. in your TDEPS issue you were using undertow 2.0.0.alpha which I don’t use for shadow-cljs
and you really do not gain anything by running shadow-cljs (or any other CLJS tool) alongside your CLJ stuff
I do want to support using shadow-cljs as a library but it is making things a lot harder and you don’t benefit by most of the optimizations I’m doing regarding performance and startup time
I personally switched to running one
lein repl for everything CLJ and one
shadow-cljs instance for everything CLJS
The big win that I can see for having it all in one JVM is that most tooling (CIDER, etc.) works better if you do that. There's also less "fiddling", we use datomic, so we literally can do
boot launch and everything we need is started. It's a nice experience.
We've not had any issues with mixing cljs & clj dependencies in a project in the past. Although, one time I did manage to get cljs running in it's own boot pod, with it's own dependencies, it was a nice hack. The thingis, it didn't solve any problems, so we never used it.
I think parts of shadow could be moved inside clj-embed or some other isolated runtime, including undertow.
I was just thinking about how this could be resolved, and it occurs to me that I'm surprised that cljs doesn't allow libraries to have their own npm dependencies. What happens in the case that:
with normal clojurescript? Does cljsA get jslib1.0 and cljsB get jslib 2.0? That would make sense to me in a "node.js world", so I will be surprised if nobody has at least considered this before.
cljsA -> npm-deps [jslib 1.0] cljsB -> npm-deps [jslib 2.0]
I think the
om is broken with shadow-cljs. but if render with other library(sablono), that works.
@dominicm I don't allow that since I don't want 2 versions of the same lib in the release bundle since size matters in the browser.