Closed sabeekaq closed 2 years ago
Therefore, we may need multiple versions of the component library running at the same time.
In theory - yes, but I don't think it is a good idea, you will have an extra runtime (and not) code, you can look at the source code and rewrite it in hooks or just in assets using regexp/etc. Don't think we should include this into core.
Is it possible for webpack module federation to support multiple versions of a singleton library running?
it is not same anymore.. I think no.. maybe you need to change versioning in this case e.g. use new naming my-library-next
, my-library-beta
instead of version
Put it under another share scope
@ScriptedAlchemy - are you referring to this? It is a bit confusing what it is trying to do, could you please provide some more context?
Look up advanced api module federation. I wrote a medium article a few years ago about some of the share options.
So currently I have the following architecture:
Currently, the only way the component library can work with the current setup is if we declare it as a singleton (I believe this was needed for theming and sharing state). However, for our use case this is not scalable as teams working on different apps may not want to upgrade their version of the component library at the same time as other apps. Therefore, we may need multiple versions of the component library running at the same time.
Is it possible for webpack module federation to support multiple versions of a singleton library running?