I'm a little confused as to why modules are required to be interdependent. Is it just a limitation of the dependency graph?
they do share namespaces in common. cljs.core for example. it is very large and having a copy of it in a and b kinda makes code splitting (modules) redundant. you can just make two different builds if you do no care about that and rather have standalone files.
Ah, good point! I was thinking about setting up two different builds but probably easier to set up a "blank" shared.js.
Maybe because core functions should live in either module
If you want to have two modules you can make them depend on the same base module
Yeah, that's what I've done. 👍 I currently have an a.js for /a and a b.js for /b and because they're minimal they don't currently share any namespaces in common. Eventually I'd need a shared.js once the code got complex, but initially I was expecting I wouldn't need it. My guess is that Shadow CLJS either needs a single root because it's running just one dependency tree, or because it needs one place to put its own shared code (like the dynamic module loader).
I did a blank shared before to workaround it.