Trysła says Re.Pack 3.0 streamlines configuration with a single plugin and adds APIs and documentation for using Module Federation in React Native. Earlier versions could use Federation, but required substantial manual work.
Module Federation
Speakers
Zack Jackson, webpack maintainer and creator of Module Federation, and Paweł Trysła, creator of Re.Pack, discuss Module Federation for React Native on Callstack’s React Native Show podcast.
Jackson traces the idea to the cost of distributing shared code through npm across more than 150 micro frontends. Nested package updates could take hours or days to reach the applications that needed them. Federation lets a webpack build load code from another build, aiming to support independent releases without burdening users with large duplicated bundles.
Tryśla explains that Re.Pack resolvers tell the webpack runtime where to find remote containers and chunks, either from build-time configuration or at runtime. The native Script Manager fetches and evaluates the JavaScript, then connects it to webpack’s runtime. Jackson describes the asynchronous promise mechanism that lets applications choose a remote based on runtime information such as user access or an A/B test.
Jackson describes loading independently released parts of a large app, while Trysła emphasizes loading features on demand for users who need them. Trysła cautions that using Federation to replace or add features over the air can violate app store rules. He recommends keeping features available for review and using on-demand loading to optimize delivery.
Jackson advises using Federation only when there is a clear business need, and warns that sharing whole packages can prevent tree-shaking and inflate bundles. He recommends checking bundle output and sharing only what needs to be shared, such as React when a single instance is required. Trysła adds that React Native teams should adopt it only when they have the expertise to measure and manage the result.
Takeaways
- Use Module Federation when code delivery is slowing teams down or independent releases solve a real business problem.
- Measure bundle size after configuration changes; sharing entire packages can pull in large amounts of unused code.
- In React Native, use on-demand loading to manage app size while keeping features available for app review.
- Keep federated modules self-sustaining and give them small, clear contracts with the host application.
Mentioned in this talk
Search inside this talk
What was claimed 15
- builtPaweł Trysła built Re.Pack
“creator of Re.Pack”
YouTube Unverified1 source· Talk
- role atZack Jackson is maintainer at webpack
“maintainer of webpack”
YouTube Unverified1 source· Talk
- built
“creator of the Module Federation concept”
YouTube Unverified1 source· Talk
- integrates withRe.Pack integrates with React Native
“Re.Pack is a toolkit for React Native applications.”
0:18inWhat is Re.Pack?YouTube Verified3 sources· Talk
- integrates with
“Re.Pack is a toolkit for React Native applications that works with Webpack.”
0:18inWhat is Re.Pack?YouTube Verified7 sources· Talk
- integrates withRe.Pack integrates with Module Federation
“it also enables Module Federation”
1:15inHow to build super apps with React Native and Re.Pack?YouTube Verified4 sources· Talk
- previously atpredecessor
“Haul was the predecessor to Re.Pack”
YouTube Unverified1 source· Talk
- integrates withModule Federation integrates with React Native
“proper Module Federation support in Re.Pack”
YouTube Unverified1 source· Talk
- featureRe.Pack: Version 3.0 includes APIs and documentation for Module Federation support
“The release includes new APIs for Module Federation”
YouTube Unverified1 source· Talk
- builtZack Jackson built React Loadable
“that whole ecosystem inspired React Loadable”
YouTube Unverified1 source· Talk
- role atZack Jackson is principal engineer at Lululemon
“I’m a principal engineer over at Lululemon”
YouTube Unverified1 source· Talk
- featureModule Federation: Loads modules from other webpack builds at runtime
“why can't I import a chunk from somebody else's build?”
YouTube Unverified1 source· Talk
- featureModule Federation: Supports independently releasable modules and on-demand feature loading
“load the basic set of features and get the others on demand”
YouTube Unverified1 source· Talk
- featureMedusa: Analyzes bundle size and controls which remote version is used in production
“change which version of a remote I use in production without redeploying”
YouTube Unverified1 source· Talk
- builtZack Jackson built Medusa
“I’ve actually written a SaaS tool”
YouTube Unverified1 source· Talk





