Fork me on GitHub
#shadow-cljs
<
2024-05-16
>
cjohansen13:05:13

I have a shadow-cljs project with a single build. I want to showcase my UI components with portfolio, and thought I would add another module to the same build - is this the correct way to use modules? Or should I define a separate build? With the extra module, shadow fails because there are no dependencies and it doesn’t know which one is the main module. There are no dependencies between my two modules, I just want to separate output files.

thheller13:05:02

then is must be a separate build. separate modules otherwise are for code splitting, as in splitting one file into many, not adding things to a build.

cjohansen13:05:16

Cool, thanks 👍

thheller13:05:05

make sure to use a different :output-dir. otherwise the builds will conflict with each other.

cormacc18:05:23

I've a test project on GitHub that has separate builds setup for dev, portfolio and unit test using shadow-cljs and yarn if that's of any help as an example https://github.com/cormacc/cljserial The builds are on separate ports so you can run them simultaneously - there's a 'yarn all' target that does that

cjohansen20:05:02

Cool, I’ll link it in the Readme 👍

👍 1
cormacc15:05:46

Oh - just figured out 2+2.... you're the author of portfolio - thought the name was ringing a bell 🙂 Nice tool - thank you kindly

🙏 1