For now, the importmap is only used for resolving the shared library. Adding the exposes to it does not change anything because a custom global cache is used to store the remotes and consumed by loadRemote.
Then the importShims is used only to load an URL. It could be used with the key of the exposes like importShims('mfe1/Component') and then the resolution of the URL is automatic.
In this PR, I wanted to simplify by:
no need to write an importmap into the DOM if it is used partially
fix the fact that the es-module-shims could be not in sync with the custom global cache
Use importShims('mfe1/Component') like a javascript imports instead of using the baseUrl
Split of https://github.com/angular-architects/module-federation-plugin/pull/513
Description
For now, the importmap is only used for resolving the shared library. Adding the exposes to it does not change anything because a custom global cache is used to store the remotes and consumed by
loadRemote
.Then the
importShims
is used only to load an URL. It could be used with the key of the exposes likeimportShims('mfe1/Component')
and then the resolution of the URL is automatic.In this PR, I wanted to simplify by:
importShims('mfe1/Component')
like a javascript imports instead of using the baseUrl