-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Labels
status:newNew issue, not reviewed by the team yet.New issue, not reviewed by the team yet.type:bugA bug report.A bug report.
Description
Describe the bug
Description
We are experiencing severe performance issues when using ModuleFederationPluginV2 in a React Native application with Re.Pack. The app startup time increases dramatically, especially on mid-range Android devices.
Environment
- Re.Pack version: 5.x (latest)
- React Native: 0.79+
- React: 19.x
- @module-federation/runtime: latest
- Platform: Android (iOS is less affected)
- Bundler: Rspack
- Device: Mid-range Android devices (e.g., Samsung A series, Xiaomi Redmi)
Problems Encountered
1. π’ Slow App Startup with ModuleFederationPluginV2
When using ModuleFederationPluginV2 with a large number of shared dependencies (15-30+ packages), the app startup time increases by 5-15+ seconds on mid-range Android devices.
Current config example:
new Repack.plugins.ModuleFederationPluginV2({
name: "loyalty",
dts: false,
remotes: STANDALONE
? {
InvoicePayment: `InvoicePayment@http://localhost:9000/${platform}/mf-manifest.json`,
HelpCenter: `HelpCenter@http://localhost:9001/${platform}/mf-manifest.json`,
TrackingOrder: `TrackingOrder@http://localhost:9002/${platform}/mf-manifest.json`,
MWGShop: `MWGShop@http://localhost:9003/${platform}/mf-manifest.json`,
UtilityServices: `UtilityServices@http://localhost:9004/${platform}/mf-manifest.json`,
DMX: `DMX@http://localhost:9003/${platform}/mf-manifest.json`,
PaymentGateway: `PaymentGateway@http://localhost:8000/${platform}/mf-manifest.json`,
}
: {
InvoicePayment: `[email protected]`,
HelpCenter: `[email protected]`,
TrackingOrder: `[email protected]`,
MWGShop: `[email protected]`,
UtilityServices: `[email protected]`,
DMX: `[email protected]`,
PaymentGateway: `[email protected]`,
},
shared: {
...getSharedDependencies({ eager: true, bundle: false }),
"react-native-webrtc": { singleton: true, eager: true },
},
})
### System Info
```shell
npx react-native infoRe.Pack Version
5.2.1
Reproduction
url
Steps to reproduce
Steps to reproduce
sleeper-luke
Metadata
Metadata
Assignees
Labels
status:newNew issue, not reviewed by the team yet.New issue, not reviewed by the team yet.type:bugA bug report.A bug report.