This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-09
Channels
- # announcements (17)
- # babashka (8)
- # beginners (68)
- # calva (28)
- # clj-kondo (36)
- # cljsrn (1)
- # clojure (232)
- # clojure-dev (3)
- # clojure-europe (13)
- # clojure-nl (14)
- # clojure-spec (9)
- # clojure-uk (11)
- # clojuredesign-podcast (3)
- # clojurescript (38)
- # core-async (3)
- # cursive (1)
- # datahike (4)
- # datomic (4)
- # fulcro (56)
- # graphql (1)
- # helix (3)
- # honeysql (5)
- # introduce-yourself (1)
- # kaocha (2)
- # lsp (67)
- # malli (7)
- # meander (2)
- # off-topic (1)
- # pathom (9)
- # re-frame (55)
- # reitit (3)
- # releases (8)
- # remote-jobs (12)
- # shadow-cljs (12)
- # sql (3)
- # tools-deps (55)
- # vim (5)
- # xtdb (3)
I have a lazy loading question: I noticed that together with lazy loading of code I should b lazy loading of css. I know shadow does not deal with css. But it would be great to listen to module load events. So as soon as a module starts loading, I would like to load the associated css. Is this possible?
@hoertlehner not with the built-in loader but you can easily wrap that to add your own css loading
thanks @thheller your fast answers are incredibly helpful for me in using shadow-cljs. I really dont know how you find the time to provide such great support! thanks!
Hey everyone! I'm trying to get the Puppeteer library to work with ClojureScript/ShadowCLJS and I'm getting this error when requiring it:
Closure compilation failed with 1 errors
--- node_modules/puppeteer/lib/cjs/puppeteer/common/AriaQueryHandler.js:33
Cannot convert ECMASCRIPT_2018 feature "RegExp named groups" to targeted output language
Is there a way to configure the goog compiler to swap out the targeted output language to a later ecmascript and use the feature anyway through the shadow.edn or something or is there more to this kind of compatibility problem?
@chandler.justin.s :compiler-options {:output-feature-set :es-next}
in your build config
not sure why you are getting this error though? are you trying to compile for the browser? puppeteer only works for node?
@thheller Ahhh you're right, I did forget to change my target to Node! Hahaha I would've spent all day on that. Thank you, I appreciate it!
when compiling a project that has uses a :bootstrap
build I’m getting a lot of Uncaught ReferenceError: goog is not defined
when the compiler is loaded in the application, I don’t get it during development and I’m not sure why… :thinking_face:
My two builds:
{:app {:target :browser
:output-dir "target/cljsbuild/public/js"
:asset-path "/js"
:module-hash-names true
:modules {:app {:entries []}}
:compiler-options {:warnings {:infer false}}
:build-hooks
[(scripts.gen-routes/watch)]
:devtools
{:watch-dir "resources/public"
:preloads [re-frisk-remote.preload
shadow.remote.runtime.cljs.browser]}
:dev
{:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}}
:js-options
{:resolve {"dom-helpers/class/addClass" {:target :npm
:require "dom-helpers/addClass"}
"dom-helpers/class/removeClass" {:target :npm
:require "dom-helpers/removeClass"}}}}
:bootstrap {:target :bootstrap
:output-dir "target/cljsbuild/public/js/bootstrap"
:asset-path "/js/bootstrap"
;; These are the namespaces we expose to the bootstrapped compiler
:entries [cljs.js
dlstats.telemetry.common
dlstats.telemetry.schema]
:compiler-options
{:warnings {:infer false}}
;; many macro namespaces can't be evaluated in ClojureScript -
;; so we exclude them here to avoid runtime errors. Note that
;; it's ok to include code that consumes Clojure (jvm) macros,
;; but only selfhost-compatible macros can be evaluated "live".
:exclude #{cljs.js}}