You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JavaScript bundlers play a critical role in the React Native ecosystem by transforming modern JavaScript code into optimized packages that can run efficiently on mobile devices. Over time, various bundling tools have emerged with different performance characteristics and feature sets to address the complex requirements of mobile application development. Currently, we use Metro bundler, the default tool for React Native projects.
Problem
When engineers need to start a new development session with npm run ios/android, the application's JS part is built in 30-40 seconds (cold) and 6 seconds (warm). These delays, while seemingly small, compound throughout the day and impact development velocity.
Solution
Use Re.Pack for JS bundling instead of Metro to leverage its out-of-the-box performance advantages and Webpack-based architecture.
JS build time before/after
npm run ios/android no cache: ~30-40s → ~8s (73-80% reduction) npm run ios/android with cache: 6s → 1s (83% reduction)
I'll coordinate this with Povi, but just as a heads up this will have to be timed nicely with the introduction of RNEF for remote builds, which is happening early next week. We probably don't want to get both the tools into main at the same time and touch all the builds steps - my recommendation would be to await merging Repack just a little bit.
I'm not sure where we stand with this one. I don't think we really have consensus to adopt Re.Pack, and its marginal bundle size reduction and productivity improvements aren't the most pressing problems to solve, so I'm going to just close this for now for #focus.
I believe we're open to the idea of adopting Re.Pack, but only as a solution to a serious problem, and ideally a customer-facing problem at that. It seems like the ROI of a bundle size 10% JS bundle size reduction would be really low for now. Maybe down the line as a way to load larger JS bundles (such as translations or on-device LLMs) OTA, Re.Pack would be a way to provide functionality that Metro can't.
Reacted by Vit Horacek, Adam Horodyski and Fábio Henriques
Activity
[-]Replace Metro bundle with Re.Pack[/-][+][DX] Replace Metro bundler with Re.Pack[/+]zirgulis commentedon Mar 12, 2025
Hi I'm Povilas from Callstack and I would like to work on this issue.
adhorodyski commentedon Mar 13, 2025
I'll coordinate this with Povi, but just as a heads up this will have to be timed nicely with the introduction of RNEF for remote builds, which is happening early next week. We probably don't want to get both the tools into
mainat the same time and touch all the builds steps - my recommendation would be to await merging Repack just a little bit.roryabraham commentedon Mar 19, 2025
ok, let's just put this on HOLD until #58743 is done. feel free to work on testing it out locally with rnef in the meantime though @zirgulis
[-][DX] Replace Metro bundler with Re.Pack[/-][+][HOLD #58743][DX] Replace Metro bundler with Re.Pack[/+]adhorodyski commentedon Mar 19, 2025
👍🏼 We agreed with @zirgulis will keep on rebasing these updates on a separate branch & testing with the Repack plugin for RNEF.
zirgulis commentedon Mar 19, 2025
yes I'm currently testing the RNEF CLI locally together with repack 👍🏼
parasharrajat commentedon Mar 30, 2025
I can help review this as well given that I am reviewing #58743
roryabraham commentedon Apr 1, 2025
Great, bringing on @parasharrajat as C+ here. Thanks for volunteering @parasharrajat!
41 remaining items
roryabraham commentedon Aug 25, 2025
@mountiny For context, this originated in a slack proposal here.
[-][HOLD][DX] Replace Metro bundler with Re.Pack[/-][+][DX] Replace Metro bundler with Re.Pack[/+]mountiny commentedon Aug 29, 2025
Yeah we got a new one more up to date https://expensify.slack.com/archives/C05LX9D6E07/p1756377665249379
roryabraham commentedon Sep 3, 2025
updated proposal and discussion here
roryabraham commentedon Sep 12, 2025
I'm not sure where we stand with this one. I don't think we really have consensus to adopt Re.Pack, and its marginal bundle size reduction and productivity improvements aren't the most pressing problems to solve, so I'm going to just close this for now for #focus.
I believe we're open to the idea of adopting Re.Pack, but only as a solution to a serious problem, and ideally a customer-facing problem at that. It seems like the ROI of a bundle size 10% JS bundle size reduction would be really low for now. Maybe down the line as a way to load larger JS bundles (such as translations or on-device LLMs) OTA, Re.Pack would be a way to provide functionality that Metro can't.