
At Expensify, every engineer bundled the React Native app several times a day, and CI did it on every build. The team's migration issue put native production JavaScript bundling at 11 seconds when it could reuse cached work, or 88 to 94 seconds with an empty cache.
Web and native also had different build setups to maintain, including two implementations of React Compiler that could handle the same code differently. Moving native from Metro to Re.Pack gave Expensify a way to share more tooling with web while cutting the time spent bundling. In the migration benchmarks, that 11-second warm production bundle came down to 2 seconds, about 82% less time.
Why Re.Pack fit the existing setup
In July 2026, Expensify had moved web builds to Rsbuild, which runs on Rspack, a bundler written in Rust. Re.Pack, our build tool for React Native, also supports Rspack, so the native app could use the same underlying bundler as web.
Native used the Babel React Compiler and web used OXC, whose behavior could differ when compiling the same application code. In the PR review, the team flagged the risk of accidentally using the Babel compiler and missing the resulting differences in CI.
Putting native on Re.Pack would let it use the OXC pipeline already used by web. Engineers could then check compiler behavior across web and native using the same implementation and move toward shared settings.

Getting the app onto the new pipeline
Expensify configured Re.Pack to send application source and most dependencies through OXC and SWC, Rust-based tools that transform the code. Its dependency loaders run in parallel worker pools.
Some dependencies still needed Babel, including packages with Flow types and packages that register native components, so Expensify kept those on a Babel allowlist. Babel removes the Flow types and runs React Native's codegen plugin to generate the view configuration needed to register those components. If a package skips that codegen step, the app can fail at startup; a CI guard checks dependencies against the list when they change.
Testing also exposed a parsing bottleneck: a single prebuilt 0.5 MB JavaScript file took 95 seconds with hermes-parser, compared with 0.1 seconds with @babel/parser. Expensify's parser shim limits hermes-parser to files with an @flow marker and uses @babel/parser for the other files on that processing path.
The team kept Metro available behind an environment variable in the initial PR, so engineers could switch back while moving native bundling over. After HybridApp release bundling also moved to Re.Pack through Rock, the cleanup PR removed the fallback. Babel remained for the packages that needed it, along with Metro-related utilities for mapping error stacks back to source code.
Faster bundles and shared compiler settings
The migration benchmarks were run on the same machine on the same day. Cold runs started with the cache cleared; warm runs reused cached work.
| Measurement | Metro | Re.Pack + OXC | Change |
|---|---|---|---|
| Production JavaScript bundle, cold | 88 to 94 s | 54 s | About 1.7x as fast |
| Production JavaScript bundle, warm | 11 s | 2 s | 5.5x as fast |
| Dev server startup, cold, single platform | 63 s | 47 s | About 25% less time |
| Dev server startup, warm | 8 s | 4 s | 50% less time |
| Minified JavaScript size | 38.12 MB | 35.73 MB | 6.3% smaller |
| Hermes bytecode size | 45.15 MB | 46.75 MB | 3.5% larger |
Each warm production bundle in the benchmark took 9 fewer seconds, and cold bundling fell by 34 to 40 seconds. That reduced the repeated wait the team had described in its migration issue.
The smaller JavaScript output came with a trade-off, though: Hermes bytecode grew by 3.5%. The PR authors suspected duplicated import wrappers and planned further investigation, including startup measurements. These results cover JavaScript bundling; full native builds and application startup need their own measurements.
The migration also addressed the compiler split. Expensify's shared OXC React Compiler configuration supplies settings for native and web builds, the Jest transform, and compiler checks. A change to those settings can be made in one place and checked across platforms. Web and native retain their own build configurations, with Babel handling the code that still needs it.
If your web build already uses Rspack, this is a reason to look at what native could share with it. Measure the bundling time you stand to save, then check which compiler settings you could maintain together and which dependencies need extra processing. Expensify kept Metro available while making that switch; the Re.Pack quick start covers setup, and its linked PRs show the compatibility work involved.
FAQ
More on Expensify’s Move to Re.Pack
How much faster was Re.Pack than Metro for Expensify?
In Expensify's migration benchmarks, warm production JavaScript bundling fell from 11 seconds to 2 seconds, about 82% less time. Cold production bundling took 54 seconds, compared with 88 to 94 seconds under Metro, approximately 1.7 times as fast. The measurements came from the same machine on the same day.
Why did Expensify replace Metro with Re.Pack?
Expensify wanted native to share more tooling with web, which already used Rsbuild on Rspack. Re.Pack brought native onto Rspack and let the team use the OXC React Compiler pipeline across both platforms. Tooling unification was part of the migration's stated motivation.
Does Re.Pack remove the need for Babel?
Babel can still be part of a Re.Pack build. Expensify keeps selected dependencies on a Babel allowlist because they need Flow-type processing or React Native codegen. Other dependencies and application source use its OXC and SWC pipeline.
Does 82% less bundling time mean the app runs faster?
The 82% reduction measures the time to build a warm production JavaScript bundle. It does not measure native compilation or application startup. Expensify's reported benchmark also showed a 3.5% increase in Hermes bytecode size, which the PR authors planned to investigate.






















