Fork me on GitHub

There is docs about how to add a single cljs file on a (possibly) complex react/jsx/npm project?


@thheller: I think I may have figured out the problem I had yesterday (lot's of provide conflicts). I happened to notice that the .jar of one of our dependencies ( from clojars contains a directory called out (6.2 megabytes), which in turn contains cljs, goog, .. re_frame, .. reagent.. and a bunch of other compiled js libraries. Now I'm no expert on building packages, but that doesn't seem quite right?


@lasse.maatta yes. that is not correct and should not be done

Wilson Velez16:10:09

Hi, I’m moving from leiningen and figweel to shadow-cljs.

Wilson Velez16:10:10

I’m doing a single re-frame app that has a db.cljs file with the specs and a handler.cljs file with the database initialization. after the initialization there is an interceptor used for debug

Wilson Velez16:10:21

(def check-spec-interceptor
  (after (partial check-and-throw :custodian_assets.db/db)))

Wilson Velez16:10:23

but I’m getting this error

Wilson Velez16:10:27

alpha.cljs:71 Uncaught Error: Unable to resolve spec: :custodian_assets.db/db
    at Object.cljs$spec$alpha$reg_resolve_BANG_ [as reg_resolve_BANG_] (alpha.cljs:71)
    at Object.cljs$spec$alpha$Specize$specize_STAR_$arity$1 (alpha.cljs:128)
    at Function.cljs$core$IFn$_invoke$arity$1 (alpha.cljs:124)
    at Function.cljs$core$IFn$_invoke$arity$1 (alpha.cljs:141)
    at Function.cljs$core$IFn$_invoke$arity$2 (alpha.cljs:359)
    at custodian_assets$handlers$check_and_throw (handlers.cljs:14)
    at Function.G__14213__2 [as cljs$core$IFn$_invoke$arity$2] (core.cljs:4268)
    at re_frame$std_interceptors$after_$_after_after (std_interceptors.cljc:313)
    at Object.re_frame$interceptor$invoke_interceptor_fn [as invoke_interceptor_fn] (interceptor.cljc:68)
    at Object.re_frame$interceptor$invoke_interceptors [as invoke_interceptors] (interceptor.cljc:106)

Wilson Velez16:10:02

What am I missing?


Hi, quick question - I’m trying to use , which has (:require [cljsjs.semantic-ui-react]… in it. This adds about 600 files to my dev build, but when it’s compiled for production, only the actually used components will remain, or b/c it’s cljsjs, it’ll keep the whole semantic ui code? Thanks!


@hoopes all will be included yes


so cljsjs stuff (i think i heard you say this in a podcast?) is best to avoid when using shadow?


you can only requite whatever you need manually but when including the root package everything will be included


no its the same if you import (:require ["semantic-ui-react" ...])


right, but the soda-ash lib uses cljsjs, so i should avoid that lib in shadow (?)


soda-ash yes thats a problem if it always imports everything


gotcha - thanks!


does it make sense to try to control two different browser apps from a single shadow-cljs.edn file?


and/or does it make sense/is it possible to change source paths per app? or does the namespacing make that irrelevant? (sorry, my first cljs app…)


@hoopes :source-paths can only be configured once per shadow-cljs.edn, not per build. you run have multiple builds per config though that is perfectly fine. only code used in a build will actually be compiled


ok, great, thanks again


Hi all. I have confusing issue regarding paths. How to solve situation where application in prod sits on some path like but in dev there is no need for /coolapp path? in index.html I have /coolapp but then having issues with paths in dev.


what I did... I split builds, paths and on dev I add clumsy /coolapp prefix but I hate idea that files are now copied to different locations 🙂