This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-27
Channels
- # aleph (2)
- # announcements (7)
- # beginners (74)
- # clj-kondo (23)
- # cljdoc (3)
- # cljsrn (3)
- # clojure (42)
- # clojure-android (1)
- # clojure-uk (4)
- # clojuredesign-podcast (10)
- # clojurescript (4)
- # figwheel-main (19)
- # fulcro (19)
- # hoplon (4)
- # jobs (5)
- # juxt (8)
- # off-topic (5)
- # pathom (40)
- # perun (3)
- # shadow-cljs (56)
I have both a src/cljs/view/util.cljs
and a src/cljc/view/util.cljc
— is there a disambiguating rule for the compiler choosing one over the other?
Does anyone know how I can inject clojurescript to puppeter browser environment? Every evaluate results in error about cljs not being defined
@kingcode Yes. The compiler will choose the most specific variant applicable.
So, in your example, if you were requiring view.util
as runtime namespace, you would get the *.cljs
file.
But, on the other hand, if you were requiring view.util
as a macros namespace, the *.cljs
file wouldn't be applicable and it would look for *.clj
first and then fall back to your *.cljc
file.