Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/react-native-exports-ordering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@knocklabs/react-native": patch
---

Fix the `exports` map ordering so React Native's Metro bundler resolves the package to its source entry point (`src/index.ts`) via the `react-native` condition instead of the prebuilt CommonJS bundle. The `require` condition was previously listed first, shadowing `react-native` under Metro's package-exports resolution (enabled by default since React Native 0.79). The ordering now matches the other `@knocklabs/*` packages.
5 changes: 3 additions & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
"exports": {
"./package.json": "./package.json",
".": {
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts",
"react-native": "./src/index.ts",
"default": "./dist/esm/index.mjs"
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.mjs",
"default": "./dist/cjs/index.js"
}
},
"files": [
Expand Down
Loading