Fork me on GitHub

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


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


Thank you @mfikes