This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-17
Channels
- # announcements (7)
- # babashka (56)
- # beginners (114)
- # bristol-clojurians (4)
- # calva (22)
- # cider (7)
- # clara (1)
- # clj-kondo (17)
- # cljs-dev (1)
- # clojure (93)
- # clojure-europe (8)
- # clojure-italy (5)
- # clojure-nl (2)
- # clojure-uk (79)
- # clojuredesign-podcast (18)
- # clojurescript (108)
- # code-reviews (6)
- # cursive (3)
- # data-science (16)
- # datomic (151)
- # duct (7)
- # emacs (10)
- # events (1)
- # fulcro (76)
- # luminus (8)
- # off-topic (3)
- # other-lisps (2)
- # pathom (8)
- # re-frame (5)
- # reitit (8)
- # schema (9)
- # shadow-cljs (37)
- # specter (3)
- # sql (17)
- # tree-sitter (2)
- # yada (9)
Hi, on http://shadow-cljs.org I see None-code resources. Should this be Non-code resources? Wondering if this is a typo.
@davewo the cache includes the last-modified timestamps of the source files so if those change it will invalidate the cache. they probably change between CI builds right?
@hindol.adhya not actually sure. I am German. maybe?
Think that's a typo then. "Non-code resources" is correct English for "resources that are not code".
Is the DOM available to code that is called using :after-load
hook?
it is unreasonable to expect
(.getElementById js/document "app")
to be mountable?ah I see my misconception; DOM gets built upon page refresh
:after-load
gets called upon recompilation
my restated question is:
I configure schema-cljs.edn
with my app module thus
:modules
{:main {:entries []}}
and I have to fire up the app from with index.html
like this
<div id="app"></div>
<script src="js/main.js"></script>
<script>my.app.main();</script>
and I'm complaining about having to repeat the classname of my app in two places: index.html
and schema-cljs.edn
but I supppose this is necessary because schema-cljs.edn
goes away at release time
but the app's main function will still have to get calledis that right? or is there a smarter way to do things?
:entries
is for the google closure compiler and the tree shaking that it does. You probably want to add :init-fn
@ben.hammond instead of entries use {:init-fn
. then you can remove the second script tag that calls the main
am i going crazy or was there a way to slurp
a text file into a variable at compile time at some point using shadow-cljs?
looking through the user guide but i can't figure out what to search on
thank you so much 🙏
In the shadow-cljs repo, why are there both project.clj
and deps.edn
?
Was just nosing around after dnolen mentioned that CLJS 1.10.597 has a regression that leads to an increased bundle size and noticed that project.cljs
has 1.10.597 while deps.edn
has 1.10.520, which doesn't have the regression.
Hi!
After adding day8.re-frame/http-fx {:mvn/version "v0.2.0"}
to our project, it started failing on release builds with:
IllegalStateException: Could not find where to put constant cljs$cst$keyword$method. Used by [ajax.simple.js, ajax.xhrio.js, ajax.easy.js, sablono.core.js, ajax.interceptors.js, company.namespace.events.js, ajax.xml_http_request.js], selected common dep goog.structs.map.js
There's a reference to a similar issue on https://clojurians-log.clojureverse.org/shadow-cljs/2019-01-09, but we don't use :modules
.
What'd be the next thing to investigate?The build config is pretty straightforward:
{:target :npm-module
:output-dir "build/cljs"
:compiler-options {:infer-externs :auto
:source-map true}}
Using an aliased require appears to have fixed it (e.g. [ajax.edn :as edn]
instead of just [ajax.edn]
) :man-shrugging:
:npm-module
basically creates on :module
per namespace. so you are definitely using :modules
. I can't really remember the details from this previously. If you have something reproducible I can look at I can investigate further
I tried coming up with a repro repo, but the commit that failed yesterday works today 😞. The parallel build order might be affecting it
@thheller Hi, I daily use shadow-cljs ❤️ and it seems to have a minor security issue due to its dependencies to minimist :
please open a github issue. don't have time to look into that right now and it'll get lost in slack void
I opened this issue : https://github.com/thheller/shadow-cljs/issues/672