Skip to content

Conversation

@mikehardy
Copy link
Collaborator

@mikehardy mikehardy commented Jan 21, 2026

Description

A large part of the regression in v23.8.x appears to be related to using package.json:exports and two typescript transpiles

  • it seems package.json:exports is mostly working but there was still one issue with it (helpfully pointed out by @Bernier154 - merci beaucoup!)
  • shipping more than one distribution puts us at risk of double-loading in codebases that use both require and imports - if this happens then state that is expected to be shared may be split across the different runtimes loaded via different paths

This PR attempts to reduce the shipped transpile of typescript packages to a single ESM transpile, and fixes up what is hopefully the last remaining package.json:exports issue

Related issues

I believe this will be the last major fix required to close out the regressions on v23.8.x

Release Summary

Will be a fix release

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

Currently:

  • ✅ e2e tests pass locally (that's RN78)
  • ✅ jest passes locally
  • ✅ make-expo-demo on Expo 54 passes locally (unstable_enablePackageExports defaults to true)
  • ❓ make-expo-demo on Expo 54 with unstable_enablePackageExports false untested
  • ✅ make-expo-demo on Expo 53 (unstable_enablePackageExports defaults to true apparently?)
  • ❌ make-expo-demo on Expo 53 with unstable_enablePackageExports false
  • ❓ make-demo on RN82 with unstable_enablePackageExports either untested
  • ❓ make-demo on RN83 with unstable_enablePackageExports either untested
  • ❓ make-demo on RN84-rc with unstable_enablePackageExports either untested

Think react-native-firebase is great? Please consider supporting the project with any of the below:

@vercel
Copy link

vercel bot commented Jan 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
react-native-firebase Ready Ready Preview, Comment Jan 23, 2026 5:25pm

Request Review

@mikehardy mikehardy changed the title fix: only ship one transpile of typescript packages, and do not use package.json:exports WIP fix: only ship one transpile of typescript packages, and do not use package.json:exports Jan 21, 2026
@mikehardy mikehardy force-pushed the @mikehardy/typescript-single-transpile branch from 540f780 to 49c5c7a Compare January 23, 2026 17:00
@mikehardy mikehardy changed the title WIP fix: only ship one transpile of typescript packages, and do not use package.json:exports fix: transpile to module only, fixup app internal/common exports Jan 23, 2026
- maintain package:exports as this appears to be working now, despite the
  care implied / involved in making it work - may still be issues
- fix up subtly-incorrect package export for app internal and common
- remove the commonjs transpile in order to avoid the "Dual Package Hazard",
  where library consumers may import and require the package, resulting in
  completely separate runtimes, and subsequent errors related to expected
  state within the module not being shared between the two module loads
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.

[🐛] v23.8.0 .1 and .2 have a publishing regression - Expo plugin config is not valid - remain on 23.7.0 or wait for 23.8.3+

3 participants