Open loganvolkers opened 1 month ago
Conditional dependencies started throwing error in Bunshi 2.1 with the introduction of lifecycle hooks because it became difficult to know how to unmount dependencies when a scope was released.
The un-intended side-effect of that was disabling this use-case.
Given that you have
LibraryMolecule
that is relying onConfigScope
to set up how the molecule should be used:And you have two different configs for scope:
When you use
LibraryMolecule
withConfigScope
set toConfigAMolecule
Then it works just fine But you useLibraryMolecule
withConfigScope
set toConfigBMolecule
And it will throw aMolecule is using conditional dependencies. This is not supported.
exceptionThis is a new limitation in Bunshi 2.1 as part of the introduction of molecule lifecycles.