diff --git a/packages/react-native/package.json b/packages/react-native/package.json index c5537938fea..9436e6dd824 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -29,11 +29,28 @@ "main": "./index.js", "types": "types", "exports": { - ".": "./index.js", - "./*": "./*.js", - "./*.js": "./*.js", - "./Libraries/*.d.ts": "./Libraries/*.d.ts", - "./types/*.d.ts": "./types/*.d.ts", + ".": { + "react-native-strict-api": "./types_generated/index.d.ts", + "react-native-strict-api-UNSAFE-ALLOW-SUBPATHS": "./types_generated/index.d.ts", + "default": "./index.js" + }, + "./*": { + "react-native-strict-api": null, + "react-native-strict-api-UNSAFE-ALLOW-SUBPATHS": "./types_generated/*.d.ts", + "default": "./*.js" + }, + "./*.js": { + "react-native-strict-api": null, + "default": "./*.js" + }, + "./Libraries/*.d.ts": { + "react-native-strict-api": null, + "default": "./Libraries/*.d.ts" + }, + "./types/*.d.ts": { + "react-native-strict-api": null, + "default": "./types/*.d.ts" + }, "./gradle/*": null, "./React/*": null, "./ReactAndroid/*": null, @@ -110,6 +127,7 @@ "!src/private/testing", "third-party-podspecs", "types", + "types_generated", "!**/__docs__/**", "!**/__fixtures__/**", "!**/__flowtests__/**", diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index eabfb57f5ba..36b354176e8 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -19,11 +19,23 @@ "engines": { "node": ">=18" }, + "exports": { + ".": { + "types": "./types_generated/index.d.ts", + "default": "./index.js" + }, + "./*": { + "types": null, + "default": "./*.js" + }, + "./package.json": "./package.json" + }, "files": [ "index.js", "index.d.ts", "Lists", "README.md", + "types_generated", "Utilities", "!**/__docs__/**", "!**/__fixtures__/**",