# What changed in @module-federation/sdk

> 16 changes in @module-federation/sdk 2 from its official release notes, upgrade guides and advisories: 2 breaking, 1 security, 5 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/@module-federation/sdk/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @module-federation/sdk 2

### Breaking changes

- The node-fetch fallback and optional peer dependency were removed; native fetch is used where available, avoiding up to ~9MB of optional install weight. (2.7.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#270)
- The legacy Data Prefetch package and its related configuration, manifest fields, and runtime hooks were removed. (2.4.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#240)

### Security

- Bundle loading adds SHA-256 hashes to manifests. (2.5.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#250)

### New APIs and options

- Bundle loading gains optional cache layer integration. (2.5.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#250)
- Loader hooks can access resource context, and preload resource results are tracked. (2.5.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#250)
- Adds a callback that runs after each successful type generation in dev and prod modes, allowing follow-up work with generated files. (2.3.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#230)
- Adds outputDir so users can configure where @mf-types.zip and @mf-types.d.ts are emitted. (2.2.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#220)
- A standalone entrypoint exposes runtime-safe helpers for webpack require, share-scope globals, and ignored dynamic imports, independently of the SDK main index bundle. (2.1.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#210)

### Behavior and default changes

- Builds can exclude unused remote consumption and shared capabilities, and omit Webpack container initialization when no exposes are configured. (2.8.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#280)

### Fixes and other changes

- Chunk flushing uses manifest expose assets, including for aliased remotes, and derives legacy federated stats compatibility assets without an extra Webpack stats traversal. (2.8.1) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#281)
- Node built-in imports are now handled in the Node ESM remote loader. (2.7.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#270)
- Allows the default IP family option to auto-select when set to 0. (2.5.1) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#251)
- Fixes Windows manifest type URL resolution in dts-plugin consumeTypes. (2.5.1) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#251)
- 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. (2.4.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#240)
- Fixes capture of timeout network errors. (2.3.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#230)
- Enhances error handling for script loading and execution. (2.2.0) — [release notes](https://github.com/module-federation/core/blob/a34a045c8c9d71685c6bc00ed5da8eb096eef51a/packages/sdk/CHANGELOG.md#220)
