Skip to content

Use Metro runtime's public asyncRequire export - #58259

Open
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:codex/use-public-metro-async-require-export
Open

Use Metro runtime's public asyncRequire export#58259
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:codex/use-public-metro-async-require-export

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary:

@react-native/metro-config still resolves Metro's deprecated src/modules/asyncRequire deep path. Metro exposes metro-runtime/modules/asyncRequire as the stable public API specifically to replace src/... imports.

Use that public boundary for asyncRequireModulePath. Both specifiers currently resolve to the identical implementation, so bundle behavior is unchanged while the config no longer depends on a deprecated private layout.

Changelog:

[GENERAL] [CHANGED] - Use Metro runtime's public async-require module export.

Test Plan:

  • Verified both old and new specifiers resolve to the same Metro 0.87 implementation file.
  • yarn build metro-config
  • fresh full Flow check: 0 errors
  • targeted ESLint and Prettier checks
  • git diff --check
  • yarn test packages/metro-config --runInBand --passWithNoTests (the package currently has no Jest tests)

@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 Aug 31, 2026
@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 Aug 31, 2026
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.

1 participant