Skip to content

Provide a Manifest file of Module Federation 2.0 #774

Open
@pganster

Description

@pganster

For which library do you have a feature request?

module-federation

Information

Currently, the withFederation helpers of the module-federation RsPack and Webpack plugin only produce remoteEntry.js files. One major improvement brought by Module Federation 2.0 was the introduction of the Manifest Protocol. From this version on, module federated remote apps produced their remote information in a mf-manifest.json file by default.

Best case would be for this plugin to support both remoteEntry.js and mf-manifest.json creation, which should be controlled by the filename setting. The RsPack plugin would need to merge mfConfig.options.filename with a default here. The Webpack plugin already does this. If no filename is supplied, I would highly suggest to generate a mf-manifest.json by default as it is the newer standard.

For the RsPack plugin I think, no additional change is needed. The Webpack plugin is still using the old ModuleFederationPlugin from webpack and instead we would need to import the plugin from @module-federation/enhanced/webpack, see here. This dependency we already get transitively via @angular-architects/module-federation-runtime.

Describe any alternatives/workarounds you're currently using

We import the ModuleFederationPlugin from @module-federation/enhanced/webpack and configure the webpack config manually without the withFederation helper.

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions