Fork me on GitHub
#clojurescript
<
2019-07-27
>
kingcode14:07:51

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?

Karol Wójcik15:07:46

Does anyone know how I can inject clojurescript to puppeter browser environment? Every evaluate results in error about cljs not being defined

mfikes15:07:49

@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.

kingcode15:07:17

Thank you @mfikes