Fork me on GitHub
#nbb
<
2023-01-07
>
Oleh K.09:01:49

Hello guys, please advise how to workaround the fact that nbb requires pouchdb to be imported as [pouchdb$default :as PouchDB] , but shadow-cljs requires it to be just [pouchdb :as PouchDB]``. I want to have the same codebase for both, nbb and shadow-cljs.

borkdude09:01:30

@okilimnik You can use :target :esm in shadow-cljs and this should get you exactly the same code

Oleh K.09:01:22

shadow-cljs browser, sorry for confusion. :esm doesn't help, I tried it

borkdude09:01:06

You can use reader conditionals: #?(:org.babashka/nbb ...)

Oleh K.09:01:32

oh, cool! Thank you @borkdude, and thank you for the great tool! I was dreaming about fast execution of cljs files

❤️ 2