[app] Make the `firebase` JS SDK an optional peer dependency (~90 MB installed on iOS/Android projects that never use it)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- firebase, javascript, react-native, typescript
- Ambito
- developer-experience, mobile
Direzione di ricerca
Start by reading the @react-native-firebase/app package manifest and its nativeModule.js platform resolution, then inspect the lib/internal/web/* imports that use firebase. Check how the package documents support for “Other” platforms. Done means native-only installs no longer pull in the web SDK, while apps targeting web or macOS are told to install it; the issue leaves the packaging approach open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
@react-native-firebase/app lists firebase (the web JS SDK) as a regular dependency. The JS SDK is only used by lib/internal/web/*, through nativeModule.js, for the "Other" platforms. On iOS and Android, Metro resolves nativeModule.ios.js / nativeModule.android.js, so the JS SDK is never bundled, but every React Native project still installs it.
Evidence
- With
@react-native-firebase/[email protected]→[email protected]:firebase+@firebase/*= ~92 MB unpacked innode_modules(@firebase/firestorealone 27 MB,@firebase/auth15 MB, plus@grpc/grpc-js). - Latest
@react-native-firebase/[email protected]depends on[email protected], where@firebase/[email protected]is 64.6 MB unpacked, so the cost keeps growing.
Suggested fix
Move firebase to peerDependencies with peerDependenciesMeta: { firebase: { optional: true } }, and document that apps targeting the "Other" platforms (web, macOS via Expo, etc.) must install it. Alternatively, publish the web implementation as a separate package.
Context
Found while auditing the installed node_modules of the Ledger Live monorepo (https://github.com/LedgerHQ/ledger-live), where we try to cut install size for developers and CI. Sizes are unpacked file bytes, measured from the published tarball (jsDelivr file listing) and from a real pnpm install. Happy to send a PR if the approach suits you.
- Lingua principale
- TypeScript
- Stelle
- 12.3k
- Fork
- 2.3k
- Merge medio
- 1g 16h
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di invertase/react-native-firebase
-
Needs Attention type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
invertase/react-native-firebase#9414 ·
I maintainer di solito rispondono entro 1 giorno
-
platform: android type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
invertase/react-native-firebase#9399 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛] Firestore pipelines: Bytes and VectorValue constants are sent as their private fieldsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaimpact: web-implementation platform: all plugin: firestore type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
invertase/react-native-firebase#9413 ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛] Firestore pipelines: Timestamp (and Date) constants are sent as plain mapsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaimpact: web-implementation platform: all plugin: firestore type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
invertase/react-native-firebase#9412 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
invertase/react-native-firebase#9408 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di invertase/react-native-firebase
Issue simili
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
anthropics/claude-code#106183 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
feature:App-Tour feature:Chat ready Web
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
digitalfabrik/integreat-app#4523 · 2 reazioni ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Required Lexical field accepts two empty paragraphsForse già presa @lazerg l’ha presa oggi. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
payloadcms/payload#19222 ·
I maintainer di solito rispondono entro 1 giorno