Skip to content

don't rely on package.json exports entrypoint for react native projects #8164

@shamilovtim

Description

@shamilovtim

Preliminary Checks

Reproduction

N/A

Publishable key

N/A

Description

Hello,

Clerk is relying on the package.json exports bundling entrypoint. The exports API is unstable and experimental in react native bundlers and must be allowed to be disabled. It frequently breaks and it's not uncommon to disable it due to the problems it causes with isomorphic or web packages. Clerk is using this entrypoint with no fallbacks when it shouldn't. Best practice is to please simply use the package.json react-native: entrypoint. The react-native entrypoint has the highest precedence in react native projects and supercedes all other entrypoints. It's well supported. There are no other runtimes that rely on it. For that reason it's simple, clean and doesn't cause conflicts with other packages, bundlers or runtimes like exports: { ... } does. Thank you!

Steps to reproduce:

  1. Attempt to run an expo application with unstable_enablePackageExports disabled
  2. @clerk/expo/token-cache breaks

Expected behavior:

Expect libraries like Clerk not to rely on unstable APIs in react native applications

Actual behavior:
Clerk is relying on an unstable API

Environment

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageA ticket that needs to be triaged by a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions