angular-architects / module-federation-plugin

MIT License
683 stars 184 forks source link

feat(nf): Use es module shims fully instead of global cache not in sync #517

Open jogelin opened 1 month ago

jogelin commented 1 month ago

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 like importShims('mfe1/Component') and then the resolution of the URL is automatic.

In this PR, I wanted to simplify by: