Description
Since the most recent version it is possible to load .cljs files from Clerk viewers using :require-cljs true
. This works fine, but when I try to require a library in such a file (added in my deps.edn), several namespaces normally included in ClojureScript are reported missing: "Could not find source for CLJS namespace x"
When testing it with a library of my own[1], the following namespaces are missing:
- cljs.core
- clojure.math
- clojure.pprint
- clojure.spec.alpha
- clojure.spec.gen.alpha
- goog (yeah, just "goog")
- goog.math.Long
In our discussion on Clojurians Slack yesterday, @mk added clojure.math
: 319c002 which worked fine when I tested it. Maybe the other namespaces can also be added to increase compatibility?
Here is a test repo with my library as a dependency to reproduce the issue: https://github.com/formsandlines/clerk-cljs-test If all namespaces are included, the test-viewer
in notebooks/index.clj using the render-test
function from src/render.cljs should display :I
without any errors.
[1]: https://clojars.org/eu.formsandlines/formform (works both in clj and cljs) - I would like to render some visualizations I created as web components that need functions from that lib, so I hope to get it working there