This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-06
Channels
- # aleph (1)
- # announcements (29)
- # babashka (39)
- # beginners (52)
- # cider (3)
- # cljsrn (19)
- # clojure (167)
- # clojure-europe (15)
- # clojure-nl (2)
- # clojure-uk (62)
- # clojurescript (13)
- # community-development (8)
- # cursive (5)
- # datomic (10)
- # introduce-yourself (1)
- # java (10)
- # jobs (12)
- # jobs-discuss (1)
- # kaocha (2)
- # lsp (6)
- # luminus (1)
- # malli (15)
- # meander (3)
- # music (1)
- # nrepl (2)
- # off-topic (91)
- # pathom (4)
- # reagent (21)
- # reitit (10)
- # sci (5)
- # shadow-cljs (17)
- # spacemacs (3)
- # sql (7)
- # tools-deps (40)
- # utah-clojurians (2)
- # xtdb (7)
impossible to say without seeing the code and config. pretty much the only problems I ever had with module loading is with cache issues. eg. when you have an old shared.js but try to load newer admin.js or so but the hashes prevent that from happening usually. could be something like a service worker going crazy too though
We don't have any service worker at the moment.
And files have Git commit SHA appended, so there should be no collisions.
{:lein true
:jvm-opts ["-Dfile.encoding=UTF8" "-Xmx2G"]
:nrepl {:port 9000}
:ssl {:keystore "keystore.jks"
:password "..."}
:builds {:client {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:module-loader true
:modules {:shared {:entries []}
:main {:init-fn orgpad.client.core/init
:depends-on #{:shared}}
:admin {:entries [orgpad.client.views.administration.core]
:depends-on #{:main}}
:layout {:entries [orgpad.client.layout.webworker.core]
:depends-on #{:shared}
:web-worker true}}
:compiler-options {:infer-externs :auto
:output-feature-set :es6}
:devtools {:after-load orgpad.client.core/mount-root
:before-load orgpad.client.core/stop-web-workers
:watch-dir "resources/public"
:browser-inject :main
:loader-mode :eval}}
:landing {:target :browser
:output-dir "landing/resources/js"
:asset-path "/js"
:modules {:main {:init-fn orgpad.landing.dev/init}}
:devtools {:http-root "landing/resources"
:http-port 3500
:after-load orgpad.landing.dev/mount-root
:watch-dir "landing/resources"
:browser-inject :main}}
:emails {:target :browser
:output-dir "emails/js"
:asset-path "/js"
:modules {:main {:init-fn orgpad.server.email.dev/init}}
:devtools {:http-root "emails"
:http-port 3600
:after-load orgpad.server.email.dev/mount-root
:watch-dir "emails"
:browser-inject :main}}
:screenshot {:target :node-script
:main orgpad.screenshot.core/main
:output-to "screenshot/screenshot.js"
:devtools {:autoload true}
:compiler-options {:optimizations :simple}}}}
hmm you are not using :module-hash-names
so how do you get the proper filenames into the loader?
release build is done by this:
(defn release []
(let [version (System/getenv "GIT_SHA")]
(when-not (= (shadow/release :client {:config-merge [{:release-version version}]}) :done)
(throw (RuntimeException. "Shadow-cljs compilation failed.")))))
is admin something the regular user will actually use? or is it actual admin-only stuff?
really not super important but admin specific stuff that regular users won't use is probably better off in a separate build
the latter
btw. is there a way to run newer version of Shadow with previous Clojurescript and Closure library?
when you enter administration, the lazy component is displayed and does the loading using the code Adam posted yesterday