This is an example of using clojurescript modules to do code-splitting. It also works with figwheel 0.5.15-SNAPSHOT. There are some workarounds to get expected functionality commonly used in clojure(script) projects, like a dev ns that calls functions like enable-console-print!
once, and :on-jsload
hooks.
Namespace annotated with ^:figwheel-no-load
. Here are functions called exactly once for every module.
These are module specific dev namespaces. they require the a and b src/
entries, and perform module specific functions. these are reloaded whenever their respective modules change, and any non-idempotent calls should be wrapped in a defonce to not be evaluated on subsequent reloads.
This namespace is required by both modules, and shows how to share code across modules.
These are the actual modules that do page specific things.
NOTE: handlers will each load different script sources, but all must load cljs_base.js
, as this will contain any shared code.