Module Federation Support
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- build-system
Direzione di ricerca
Non vengono indicati file o test di Metro. Inizia esaminando il prototipo spostato nell'organizzazione Module Federation all'indirizzo module-federation/metro-mf e gli elementi completati della roadmap, quindi individua le modifiche rimanenti necessarie in Metro e nei pacchetti core di React Native. Il lavoro è completato quando le PR necessarie sono state rilasciate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This issue serves as a central place to track the support of Module Federation in Metro.
Module Federation has become the standard for decomposing large web-based applications. Through Re.Pack and Module Federation, we've seen growing excitement around the potential for federated mobile applications and a standards-based approach to building mini-apps in React Native. For long-term stability, we believe it would be ideal for Module Federation to be supported directly within Metro. This would align Metro with other bundlers that support Module Federation natively, such as webpack, Rspack, and Rolldown, as well as Vite via a community plugin.
Enabling this may require adding new capabilities to Metro and making some adjustments on the Module Federation side. A single tracking issue helps consolidate discussions and progress around these changes.
We’re excited to see this move forward!
cc @thymikee @robhogan @scriptedalchemy @valorkin
Update April 17, 2025
Example created and moved to the Module Federation organization here
Update April 15, 2025
@jbroma and @Esemesek did some preliminary research together and taking into account the insights from @ScriptedAlchemy, have pinpointed few areas that would need tackling in order to get the Module Federation working:
- - virtual modules support for the runtime modules & shared dependencies - currently there is no support for that (can be emulated by creating modules on the filesystem)
- - bundle splitting - looks like the biggest issue to enable this seems to be a system of deterministic module ids, since right now the numbers are just assigned based on order of usage
- - scoping of module system in remote containers - in webpack/rspack the containers ship with their own module system to isolate the non-shared parts - this could be as easy as wrapping the remote in IIFE but needs more research
- - async boundary support - any async actions before the first render will cause a runtime error, therefore
We're currently working on a basic prototype to uncover the other requirements, but it seems like we could skip code-splitting altogether for the time being and package everything into the remote container (remoteEntry.js).
Initial Roadmap
- finish the minimal prototype of connecting 2 apps built with metro together -
Updated: April 17, 2025 - extend the range of supported MF options (like non-singleton shared deps or version-first share startegy)
- develop the official MF plugin in the mf core repo based on the prototype implementation (or simply move it)
- ship the necessary PRs to metro & react-native core packages (like community-cli-plugin)
- Lingua principale
- JavaScript
- Stelle
- 5.6k
- Fork
- 702
- Merge medio
- 3g 2h
- PR unite (30g)
- 44
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 react/metro
-
constant-folding-plugin emits 0/0 (NaN) for arithmetic on destructured bindingsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
react/metro#1927 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[0.83.x] Backport micromatch removal and dotfile/multipart watcher fix togetherForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
`dependencies is not iterable` / `Cannot read property 'reduce' of undefined`: `FileStore` serves zero-prefixed cache files as hitsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
react/metro#1961 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Async chunk URLs drop the file extension, so .cjs async imports fail with "Requiring unknown module"Forse già presa @dasjideepak l’ha presa 11 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
react/metro#1959 · 2 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
[BUG] Multi-day events show "Ended" while still in progressForse già presa @tarunagnihotri534 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
data-umbrella/du-event-board#231 · 2 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
NaturalIntelligence/fast-xml-parser#888 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
USACE/chart-docs#766 ·
-
bug callouts regression revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
quarto-dev/quarto-cli#15014 ·
I maintainer di solito rispondono entro 1 giorno