Repository navigation
Conversation
- Keep runtime plugins passed to ModuleFederationPluginV2 as [path, options]; they were silently dropped before. - Derive the runtime plugin types from `init`, so the @callstack/repack/mf/* typings work with @module-federation/enhanced before and after 0.17, which renamed FederationRuntimePlugin and FederationHost to ModuleFederationRuntimePlugin and ModuleFederation. - Bump @module-federation/enhanced and sdk dev dependencies to 2.9.2, and enhanced and runtime in the testers catalog.
🦋 Changeset detectedLatest commit: 02d66ae The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@whydidoo is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
dannyhw
approved these changes
Oct 9, 2026
dannyhw
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this looks good. I checked it locally: the unit and integration tests pass, the emitted mf/* typings resolve properly against enhanced 0.6.10, 0.8.9, 0.16, 0.17 and 2.9.2, and a tester-federation-v2 bundle with a [path, options] runtime plugin passes the options through to the plugin at runtime. One small nit inline, not blocking.
# Conflicts: # pnpm-lock.yaml
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While moving to MF 2.x I ran into two issues in Re.Pack:
runtimePluginsentries in the[path, options]form (new in MF 2.x) were silently dropped.ModuleFederationPluginV2passes each entry torequire.resolve, which throws on an array, and the catch just ignores it. Now the path gets resolved and the options are kept.The typings for
@callstack/repack/mf/*are broken on enhanced >= 0.17. MF renamedFederationRuntimePlugin->ModuleFederationRuntimePluginandFederationHost->ModuleFederationthere (no aliases), and our d.ts still imports the old names. Just renaming them would break anyone on older versions (peer is>=0.6.10), so the types are now derived frominit(), which exists in every version.Also bumped enhanced/sdk in repack devDeps to 2.9.2 and the testers catalog to match. They need to be in sync because
ModuleFederationPluginV2loads repack's ownenhanced, so the tester apps were actually building with 0.8.9.Peer range is unchanged.
Test plan
[path, options](fails on main)skipLibCheck: false: plugin types resolve correctly in both, notany