Skip to content

Bump Metro to 0.88.0 - #59831

Merged
cortinico merged 1 commit into
mainfrom
robhogan/metro-0.88.0
Nov 9, 2026
Merged

cortinico merged 1 commit into
mainfrom
robhogan/metro-0.88.0

Conversation

@robhogan

@robhogan robhogan commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary:

Bump Metro to 0.88.0, a breaking release: https://github.com/react/metro/releases/tag/v0.88.0

Almost all of the breaking changes are integrator-facing, the others are resolver spec alignment. Users are most likely to notice:

  • Packages' "exports" are read from the package root, and "browser" redirections apply after them, so some subpath imports resolve to a different build. resolver.unstable_resolveExportsFromPackageRoot and resolver.unstable_applyBrowserSpecAfterExports turn either off.
  • resolver.emptyModulePath defaults to metro:runtime/modules/empty-module. Custom resolvers already have to delegate metro: specifiers they don't handle, for metro:babel-runtime, but code that reads the option as a file path breaks.

NOTE: I intend to pick this to 0.89.0-rc.1

Other changes in this PR

  • Removes the config defaults that now match Metro's core defaults (transformer.asyncRequireModulePath, transformer.allowOptionalDependencies and watchFolders: [])
  • Remove two Flow suppressions for transformer options that Metro's types now declare.
  • @react-native/metro-babel-transformer passes supportsInlineModules to Babel in the caller, as metro-babel-transformer does, so that presets and plugins can tell whether metro:inline specifiers (Resolver: Add metro:inline specifiers for importer-anchored inline modules metro#2037) will resolve.

Changelog

[General] [Changed] - Bump Metro to 0.88.0
[General] [Added] - @react-native/metro-babel-transformer passes Metro's supportsInlineModules to Babel presets and plugins

Test Plan

yarn install --frozen-lockfile --ignore-scripts
yarn flow-check
yarn test packages/metro-config packages/react-native-babel-transformer packages/community-cli-plugin

New unit test for supportsInlineModules, which fails for true and false without the change. getDefaultConfig() returns the same values for every option with and without the removed defaults.

Metro 0.88.0 was tested end to end in a React Native 0.89.0-rc.0 template app before release (react/metro#2192).

## Summary:

Bump Metro to 0.88.0, a breaking release: https://github.com/react/metro/releases/tag/v0.88.0

The changes React Native projects are most likely to notice:

 - Packages' `"exports"` are read from the package root, and `"browser"` redirections apply after them, so some subpath imports resolve to a different build. `resolver.unstable_resolveExportsFromPackageRoot` and `resolver.unstable_applyBrowserSpecAfterExports` turn either off.
 - `resolver.emptyModulePath` defaults to `metro:runtime/modules/empty-module`. Custom resolvers already have to delegate `metro:` specifiers they don't handle, for `metro:babel-runtime`, but code that reads the option as a file path breaks.
 - Lazy bundle URLs keep the file extension (`/src/Foo.js.bundle`). Old URLs still work.

This also removes the defaults that Metro now has itself (`transformer.asyncRequireModulePath`, `transformer.allowOptionalDependencies` and `watchFolders: []`), and two Flow suppressions for transformer options that Metro's types now declare.

Finally, `@react-native/metro-babel-transformer` passes `supportsInlineModules` to Babel in the caller, as `metro-babel-transformer` does, so that presets and plugins can tell whether `metro:inline` specifiers (react/metro#2037) will resolve.

## Changelog:

[General] [Changed] - Bump Metro to 0.88.0
[General] [Added] - `@react-native/metro-babel-transformer` passes Metro's `supportsInlineModules` to Babel presets and plugins

## Test Plan:

```
yarn install --frozen-lockfile --ignore-scripts
yarn flow-check
yarn test packages/metro-config packages/react-native-babel-transformer packages/community-cli-plugin
```

New unit test for `supportsInlineModules`, which fails for `true` and `false` without the change. `getDefaultConfig()` returns the same values for every option with and without the removed defaults.

Metro 0.88.0 was tested end to end in a React Native 0.89.0-rc.0 template app before release (react/metro#2192).
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 6, 2026
@robhogan
robhogan requested review from cipolleschi, cortinico, huntie and vzaidman and removed request for huntie November 6, 2026 18:41
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 6, 2026
@meta-codesync

meta-codesync Bot commented Nov 9, 2026

Copy link
Copy Markdown

@cortinico has imported this pull request. If you are a Meta employee, you can view this in D130252821.

fabriziocucci pushed a commit that referenced this pull request Nov 9, 2026
@cortinico
cortinico enabled auto-merge (squash) November 9, 2026 13:45
@cortinico
cortinico merged commit ab0c35d into main Nov 9, 2026
104 of 106 checks passed
meta-codesync Bot pushed a commit to react/metro that referenced this pull request Nov 9, 2026
Summary:


Bump Metro to 0.88.0, a breaking release: https://github.com/react/metro/releases/tag/v0.88.0

Almost all of the breaking changes are integrator-facing, the others are resolver spec alignment. Users are most likely to notice:

 - Packages' `"exports"` are read from the package root, and `"browser"` redirections apply after them, so some subpath imports resolve to a different build. `resolver.unstable_resolveExportsFromPackageRoot` and `resolver.unstable_applyBrowserSpecAfterExports` turn either off.
 - `resolver.emptyModulePath` defaults to `metro:runtime/modules/empty-module`. Custom resolvers already have to delegate `metro:` specifiers they don't handle, for `metro:babel-runtime`, but code that reads the option as a file path breaks.
 
 **NOTE: *I intend to pick this to 0.89.0-rc.1***

### Other changes in this PR

 - Removes the config defaults that now match Metro's core defaults (`transformer.asyncRequireModulePath`, `transformer.allowOptionalDependencies` and `watchFolders: []`)
 - Remove two Flow suppressions for transformer options that Metro's types now declare.
 - `react-native/metro-babel-transformer` passes `supportsInlineModules` to Babel in the caller, as `metro-babel-transformer` does, so that presets and plugins can tell whether `metro:inline` specifiers (#2037) will resolve.

## Changelog

[General] [Changed] - Bump Metro to 0.88.0
[General] [Added] - `react-native/metro-babel-transformer` passes Metro's `supportsInlineModules` to Babel presets and plugins

X-link: react/react-native#59831

Test Plan:
```
yarn install --frozen-lockfile --ignore-scripts
yarn flow-check
yarn test packages/metro-config packages/react-native-babel-transformer packages/community-cli-plugin
```

New unit test for `supportsInlineModules`, which fails for `true` and `false` without the change. `getDefaultConfig()` returns the same values for every option with and without the removed defaults.

Metro 0.88.0 was tested end to end in a React Native 0.89.0-rc.0 template app before release (#2192).

Reviewed By: vzaidman

Differential Revision: D130252821

Pulled By: cortinico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants