Skip to content

fix: export source entry for React Native - #348

Open
chrispader wants to merge 1 commit into
mainfrom
codex/react-native-source-export
Open

fix: export source entry for React Native#348
chrispader wants to merge 1 commit into
mainfrom
codex/react-native-source-export

Conversation

@chrispader

Copy link
Copy Markdown
Member

React Native consumers can resolve react-native-nitro-sqlite through the package exports map, but that map currently exposes only the built ESM and CommonJS entry points. Metro therefore cannot select the package source when it resolves the package through conditional exports. This PR extracts the React Native source condition from #298 so the package fix can be reviewed independently of macOS support.

The new condition points to src/index.ts, which is already included in the published files list. Metro selects that source entry for both iOS and Android, while ordinary ESM imports and CommonJS requires retain their existing built targets. No example-wide Metro alias is needed for installed-package resolution.

Originally authored by @samuelscheit in #298.

Closes #344.

Extracted from #298.

Co-authored-by: Samuel Scheit <github@samuelscheit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract the React Native source export from macOS support

1 participant