Skip to content

[Chore]: Use manifest passed in options#4332

Merged
zhoushaw merged 3 commits intomodule-federation:mainfrom
karanpvyas:chore/spread-manifest-options
Mar 9, 2026
Merged

[Chore]: Use manifest passed in options#4332
zhoushaw merged 3 commits intomodule-federation:mainfrom
karanpvyas:chore/spread-manifest-options

Conversation

@karanpvyas
Copy link
Copy Markdown
Contributor

@karanpvyas karanpvyas commented Jan 29, 2026

Description

Title: feat: Allow spreading of manifest options in NextFederationPlugin

Refactors how the manifest configuration is built in NextFederationPlugin so that user-provided manifest options are merged with the plugin’s defaults instead of being ignored.

Previously, the plugin only set a conditional manifest object with filePath based on isServer (empty string for server, /static/chunks for client). Any manifest options passed into the plugin were not used.

Changes:

  • The plugin now always passes a manifest object into the underlying configuration.
  • User options from this._options.manifest are spread first: ...(this._options.manifest ?? {}).
  • The plugin’s filePath is set after the spread so the existing behavior is preserved: filePath: isServer ? '' : '/static/chunks'.

This lets users pass custom manifest options (e.g. name, publicPath) while the plugin still controls filePath based on server vs client. The change is non-breaking and follows the same merge pattern used for shared, remotes, and exposes.

Related Issue

#4333

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 29, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit b4561dd
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69ae23326771dc000804f26c
😎 Deploy Preview https://deploy-preview-4332--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: b4561dd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@zhoushaw zhoushaw merged commit 0718859 into module-federation:main Mar 9, 2026
7 of 9 checks passed
@2heal1 2heal1 mentioned this pull request Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants