Shared namespaces / shadowing


I’m breaking a single, large, library into smaller pieces but would like each sub-library to share the same top-level namespace.

So, for example, whereas before I had a library named ‘my-library’ with modules ‘foo’ and ‘bar’, I now have to separate libraries ‘my-library-foo’ and ‘my-library-bar’ each with the namespace ‘my-library’, set using the namespace field in bsconfig.json.

Additionally, some of the libraries depend on each other and when I try to reference a dependency with a shared namespace, it looks like the modules from the dependency are shadowed e.g. if my-library-bar has my-library-foo as a dependency, when I write open MyLibrary in module it cannot find Foo.

Is there any way to do this?


Only manually, as far as I know. See my posts that talk about this: