From cd0d93ac2a0cadf8987267699d394c9c4ccd7f54 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Fri, 19 Jun 2026 06:20:42 -0700 Subject: [PATCH] Narrow root wildcard entry point (#57276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Pull Request resolved: https://github.com/react/react-native/pull/57276 Simplify `"exports"` mapping on the `react-native` package by replacing the `"./*"` wildcard export with explicit listed subpaths (invert from blocklist to allowlist). These changes are **non-breaking** — the net accessible exports subpaths before/after are equivalent. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D109018823 fbshipit-source-id: eeb8b2ac147487fbe224d4a1da438d51099cbcde --- packages/react-native/package.json | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 01ad9377f2c..ce52edc09e9 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -34,14 +34,14 @@ "types": "./types/index.d.ts", "default": "./index.js" }, - "./*": { + "./Libraries/*": { "react-native-strict-api": null, - "types": "./*.d.ts", - "default": "./*.js" + "types": "./Libraries/*.d.ts", + "default": "./Libraries/*.js" }, - "./*.js": { + "./Libraries/*.js": { "react-native-strict-api": null, - "default": "./*.js" + "default": "./Libraries/*.js" }, "./Libraries/*.d.ts": { "react-native-strict-api": null, @@ -56,16 +56,9 @@ "react-native-strict-api": null, "default": "./types/*.d.ts" }, - "./gradle/*": null, - "./React/*": null, - "./ReactAndroid/*": null, - "./ReactApple/*": null, - "./ReactCommon/*": null, - "./sdks/*": null, + "./jest-preset": "./jest-preset.js", + "./rn-get-polyfills": "./rn-get-polyfills.js", "./src/fb_internal/*": "./src/fb_internal/*", - "./third-party-podspecs/*": null, - "./types/*": null, - "./types_generated/*": null, "./package.json": "./package.json" }, "jest-junit": {