nbb

Oleh K. 2023-01-07T09:15:49.284229Z

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.

borkdude 2023-01-07T09:16:30.105969Z

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

Oleh K. 2023-01-07T09:17:22.093329Z

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

borkdude 2023-01-07T09:18:06.988949Z

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

Oleh K. 2023-01-07T09:20:32.199949Z

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

❤️ 1