npm / @module-federation/sdk
@module-federation/sdk
What changed in @module-federation/sdk 0.21 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-24.
2 breaking1 security5 new APIs and options2 behavior and defaults9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@module-federation/sdk 217 changes
Breaking changes 2
The node-fetch fallback and optional peer dependency were removed; native fetch is used where available, avoiding up to ~9MB of optional install weight.
The legacy Data Prefetch package and its related configuration, manifest fields, and runtime hooks were removed.
Security 1
Bundle loading adds SHA-256 hashes to manifests.
New APIs and options 5
Bundle loading gains optional cache layer integration.
Loader hooks can access resource context, and preload resource results are tracked.
Adds a callback that runs after each successful type generation in dev and prod modes, allowing follow-up work with generated files.
Adds outputDir so users can configure where @mf-types.zip and @mf-types.d.ts are emitted.
A standalone entrypoint exposes runtime-safe helpers for webpack require, share-scope globals, and ignored dynamic imports, independently of the SDK main index bundle.
Behavior and default changes 1
Builds can exclude unused remote consumption and shared capabilities, and omit Webpack container initialization when no exposes are configured.
Fixes and other changes 8
CommonJS declarations are emitted as .d.cts files, and the require types condition points to them, avoiding concurrent CJS and ESM writes to the same declaration path.
Chunk flushing uses manifest expose assets, including for aliased remotes, and derives legacy federated stats compatibility assets without an extra Webpack stats traversal.
Node built-in imports are now handled in the Node ESM remote loader.
Allows the default IP family option to auto-select when set to 0.
Fixes Windows manifest type URL resolution in dts-plugin consumeTypes.
The optional peer range now accepts node-fetch ^2.7.0 as well as ^3.3.2, resolving a version conflict with @module-federation/node.
Fixes capture of timeout network errors.
Enhances error handling for script loading and execution.
@module-federation/sdk 0.212 changes
Behavior and default changes 1
Debug mode now includes stack traces in logs.
Fixes and other changes 1
Fixes a TS1170 error when using the SDK with TypeScript versions greater than 5.7.0.