This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-23
Channels
- # 100-days-of-code (5)
- # announcements (3)
- # beginners (68)
- # cider (2)
- # cljdoc (2)
- # cljs-dev (10)
- # cljsjs (2)
- # clojure (40)
- # clojure-austin (2)
- # clojure-dev (17)
- # clojure-italy (8)
- # clojure-spec (4)
- # clojure-uk (9)
- # clojurebridge (1)
- # clojurescript (48)
- # datomic (4)
- # emacs (4)
- # figwheel-main (93)
- # fulcro (8)
- # hyperfiddle (33)
- # jobs-discuss (3)
- # luminus (60)
- # off-topic (66)
- # onyx (42)
- # pedestal (11)
- # re-frame (35)
- # reagent (1)
- # reitit (39)
- # shadow-cljs (30)
- # specter (27)
Sorry for the delay @thheller! http://shadow-cljs.org/ -> Beginner Guide (== https://medium.com/@jiyinyiyong/a-beginner-guide-to-compile-clojurescript-with-shadow-cljs-26369190b786)
hi, I'm trying to setup code splitting with below config. I have app.main
which is an spa router and 2 pages (home & todo)
:modules {:shared {}
:main {:entries [app.main]
:depends-on #{:home :todo}}
:home {:entries [app.pages.home]}
:todo {:entries [app.pages.todo]}}
however doing so yields two modules without deps, please specify which one is the default
. but those 2 pages dont really depends on anything except rum. Am I missing something here? :thinking_face:perhaps the error message could be improved? I too got it and was baffled, @thheller; perhaps: > two modules without deps, perhaps they should both depend on a third, "shared" module (with empty entries)? see <url to docs for this>
@gnhuy91 you need to specify a shared module. so its probably the reverse. :home
depends-on #{:main}
as well as todo depends on #{:main}
app.main
will always be loaded and home
and todo
on demand. so they depend on :main
hi, on "loading code dynamically", how can I access to the loaded module? (loader/load "extra")
resolver only indicate loaded/failed status and does not return the module itself. (in webpack it is import(() => "./foo").then(foo => foo.default)
)
more tricky than i thought, was building a loadable component wrapper to handle dynamic rum components
yeah closure handles modules statically so it works a bit differently than in webpack
I’m trying to get line number and position of a particular token (e.g. a path into a map)
maybe this helps. I tried something related a while ago https://dev.clojure.org/jira/browse/TRDR-42