Module Federation Support
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- build-system
Hướng nghiên cứu
Không có tệp hoặc bài kiểm thử Metro nào được nêu tên. Hãy bắt đầu bằng việc xem xét prototype đã được chuyển đến tổ chức Module Federation tại module-federation/metro-mf và các mục trong roadmap đã hoàn thành, sau đó xác định những thay đổi còn lại cần thiết trong Metro và các package cốt lõi của React Native. Công việc được xem là hoàn tất khi các PR cần thiết đã được phát hành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- JavaScript
- Star
- 5.6k
- Fork
- 702
- Merge trung bình
- 3 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react/metro
-
constant-folding-plugin emits 0/0 (NaN) for arithmetic on destructured bindingsCó thể đã có người làm @cpruijsen đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
react/metro#1927 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 35/100
react/metro#2062 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[0.83.x] Backport micromatch removal and dotfile/multipart watcher fix togetherCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 2 ngày
-
`dependencies is not iterable` / `Cannot read property 'reduce' of undefined`: `FileStore` serves zero-prefixed cache files as hitsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
react/metro#1961 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Async chunk URLs drop the file extension, so .cjs async imports fail with "Requiring unknown module"Có thể đã có người làm @dasjideepak đã nhận 20 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
react/metro#1959 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
yetone/magpie#2844 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
c1overzz/dsh-bili-scroll#22 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
maproulette/maproulette-frontend#2944 ·
Maintainer thường phản hồi trong vòng 1 ngày