angular-architects / module-federation-plugin

MIT License
683 stars 184 forks source link

[TBD] feat(nf): Inject host importmap directly into the index.html instead of processing it at runtime #518

Closed jogelin closed 1 week ago

jogelin commented 1 month ago

Split of https://github.com/angular-architects/module-federation-plugin/pull/513

Description

At runtime, the remoteEntry.json of the host is loaded, processed and converted to an importmap. However, because the processing is done by the host, it is possible to directly include it in the index.html to reduce runtime execution.

To ensure the externals are still treated correctly, we compare the filename which are containing the version of the shared.

manfredsteyer commented 1 week ago

We really need to generate the import map at runtime because we need to respect all the meta data from all the remotes in the manifest for it.