Re.Pack 5.2: Faster Babel Transforms, RN 0.80 & 0.81, Rozenite

Authors
Jakub Romańczyk
Software Engineer
@
Callstack

Re.Pack 5.2 is a big, non‑breaking release focused on two things: a modern, parallel Babel & SWC transform pipeline, which dramatically improves performance in Babel-heavy codebases, and a smoother developer experience. It also introduces official support for React Native 0.80 and 0.81.

Besides these headline features, you get fully typed configs for both Rspack and webpack bundlers, and support for enhancing the React Native DevTools with the Rozenite plugin framework along with few other minor enhancements. Read on to see what’s new and how to use it to full potential.

Transformation pipeline: fully parallel and smarter

Up until now, Re.Pack relied on a mix of tools to get your source code to something React Native runtime (i.e. Hermes or JSC) can understand. This was especially true when using Rspack as a bundler. We relied on tools like flow-remove-typesand custom workarounds to minimize the performance impact of Babel transforms. It became clear that sustaining this workflow is unfeasible and required changes. It was, in fact, the main issue that blocked supporting newer versions of React Native up until this point.

In 5.2, @callstack/repack/babel-swc-loader becomes the new, recommended way to transform JS source files with Re.Pack. This new loader seamlessly combines Babel with SWC by analyzing the presets and plugins for each file. When possible it schedules supported transforms for fast, Rust-based SWC and otherwise uses good ol’ Babel for the rest. In practice, every file will go through Babel first and then SWC will finish the job.

Combining Babel and SWC like that is only a part of the story. To make it a feasible replacement it needed to be fast. While SWC in Rspack is already natively parallelized, babel-loader on it’s own is inherently single-threaded. By taking a play from Metro’s playbook & utilizing Parallel Loaders capability from Rspack we can achieve full parallelization from start to finish reducing cold compilation times 2.6x: from 52.4s to 19.8s.

Parallel (19.8s) vs serial (52.4s) compilation for Android platform on cold cache.

In projects where SWC alone can’t handle everything, this new approach can be much faster. As soon as you add any Babel plugins to the project configuration, it easily outperforms the previous strategy. The best example that illustrates the benefits of babel-swc-loader is the use of heavy plugins like React Compiler. It used to make Re.Pack builds unusably slow, drastically increasing compilation time. Now, the overhead is smaller or comparable to that which you get in Metro when using the React Compiler.

In our benchmarks, this increasingly more common scenario, as React Compiler steadily approaches stable release (currently in Release Candidate phase, results in 2x faster compilation: from 39,5s to 19.9s.

Benchmark from https://github.com/Expensify/App comparing Re.Pack 5.2 to 5.1

The new loader is almost a silver bullet. In cases where you are not using any custom Babel plugins, the old approach is still faster. SWC does 95% of the job and Babel is limited to running codegen transforms, needed for the New Architecture builds. Realistically speaking, in smaller projects the difference between the two approaches should be much smaller and build performance degradation should not be noticeable.

Performance aside, with @callstack/repack/babel-swc-loader you can add plugins to your babel.config.js like in Metro, and there is no need to touch anything else in the configuration. It just works 🚀

To use it in your project, replace getJsTransformRules() with the following:

// rspack.config.mjs
export default {
  module: {
    rules: [
      {
        test: /\.[cm]?[jt]sx?$/,
        type: "javascript/auto",
        use: {
          loader: "@callstack/repack/babel-swc-loader",
          parallel: true,
          options: {},
        },
      },
      // ...
    ],
  },
};

Using babel-swc-loader with webpack

The new loader is also compatible with webpack configurations, and it can automatically use SWC to optimize the build time there too. All you need to do is install @swc/core and @swc/helpers in your project and you should be good to go. In cases where SWC is not available in the project context, the loader will fallback to using just Babel for the whole process, making it an universal approach regardless of the bundler used.

Every new Re.Pack project created will now use @callstack/repack/babel-swc-loader as the default way of transforming JS files—both in Rspack and webpack configurations.

Support for React Native 0.80 & 0.81 support

This release also bring official support to the newest React Native versions: 0.80 & 0.81. The reworked transformation pipeline allowed us to skip a lot of custom workarounds we had in place like minimizing impact of Flow transformations through flow-remove-types. They are now handled the official way, through a dedicated Babel plugin.

If you are using Re.Pack with Rspack together with the getJsTransformRules helper in your configuration, only React Native 0.80 is fully supported. Newer React Native releases include changes that forced us to introduce the new hybrid Babel & SWC approach. Because of that, React Native 0.81 is supported officially only through using @callstack/repack/babel-swc-loader.

TypeScript configurations

Re.Pack 5.2 adds first‑class support for .ts, .mts and .cts configuration files in both Rspack and webpack, and introduces helpers to type your configuration end‑to‑end. The new defineRspackConfig and defineWebpackConfig helpers improve editor autocomplete and catch mistakes earlier. This pairs very nicely with the native type stripping available in Node 24 and Node 22.

Helpers wrap your entire configuration like this:

// rspack.config.mts
import * as Repack from "@callstack/repack";

export default Repack.defineRspackConfig((env) => ({
  resolve: {
    ...Repack.getResolveOptions(),
  },
  module: {
    rules: [
      {
        test: /\.[cm]?[jt]sx?$/,
        type: "javascript/auto",
        use: {
          loader: "@callstack/repack/babel-swc-loader",
          parallel: true,
          options: {},
        },
      },
      ...Repack.getAssetTransformRules(),
    ],
  },
  plugins: [new Repack.RepackPlugin()],
}));

Typed configs mean the entire surface (environment function, rules, plugins, and helper utilities) benefit from static types. Even in plain JS files, your IDE can pick up on those types, hence why every new project created with Re.Pack now comes with those helpers included in the configuration.

Make sure the check out the section on TypeScript Configuration in our documentation!

Rozenite support

Since Re.Pack 5 release, the integration with the official React Native DevTools has been has been constantly refined, and we bridged even more gaps in this release. This opens the door for tools like Rozenite to integrate with Re.Pack. With it, you can add plugins to your DevTools, enhancing debugging experience with Network Activity panel or specialized add-ons for libraries like Redux or MMKV - allowing you to inspect the state of the app in a convenient manner.

To get started with Rozenite in your Re.Pack project, simply install it in the project and wrap your existing configuration like this:

// rspack.config.mjs
import * as Repack from "@callstack/repack";
import { withRozenite } from "@rozenite/repack";

export default withRozenite(
  Repack.defineRspackConfig({
    // Your existing Re.Pack configuration
  })
);

For more detailed instructions, check out the official Getting Started with Rozenite guide.

Other notable changes

We’ve also landed a series of quality‑of‑life updates for a smoother development experience along with some extra features.

Rspack compilation progress in development is now visible as a progress bar and webpack progress updates have been aligned to look the same, instead of noisy repeated messages:

You can now open a stack frame’s source directly from an error screen and it will take you that place in your editor:

Other changes include:

  • React Native DevTools sources tab is now much tidier thanks to proper formatting of paths outside of project root directory
  • Re.Pack now ships with Terser plugin preconfigured, so there is no requirement to configure it explicitly in your configuration for optimized production builds
  • ScriptManager now fully supports the file:// protocol when loading (Android) and prefetching (iOS) scripts
  • Code-signing signatures can be now verified for the bundles loaded from the device filesystem
  • You can now customize SVGR through additional options passed to getAssetTransformRules
  • Package Exports support has been improved and react-native condition is now properly resolved before import or require conditions
  • Support for 16kb page size on Android

Special thanks go to Community Contributors: https://github.com/ilteoood, https://github.com/tringenbach, https://github.com/longb1997

Upgrade guide

Upgrading is straightforward and there are no breaking changes in this release despite the vast amount of features & fixes included. Simply updating the @callstack/repack version in your package.json to 5.2.0 will do the trick.

To make the most out of this release, make sure to replace getJsTransformRules helper (Rspack) or babel-loader (webpack) in your configurations files. Since the official @react-native/babel-preset is at the heart of it all, make sure you have it installed in the project and it is present in the babel.config.js file.

Lastly, make sure to upgrade the @rspack/core version in your project too. We recommend upgrading to the latest version of Rspack 1.5.0 to have everything running smoothly. If you are using webpack you should be fine as it is, but it’s good to give it a version bump too.

Community effort: Expo Router support

One of Re.Pack open source contributors - Carlos Paludetto - managed to get Expo Router working with Re.Pack. If you are curious about such use case, be sure to check out his blog post detailing the setup needed to get this working. Our one and only thymikee also made a rundown on this subject:

Someone managed to hack Expo Router to work with @repack_rn 🤯https://t.co/soMaX2MWYx

— Michał Pierzchała (@thymikee) August 20, 2025

What’s next

With the new universal hybrid transformation pipeline, our goal is to strike the right balance between performance and full compatibility for React Native projects. The migration from Metro should be even simpler than before, removing the needed for creating custom rules to bridge custom babel.config.js files.

This release took quite some time to deliver and we feel like we can do better in that regard. We will look into publishing nightly releases to make it easier to use the newest fixes & features as soon as possible.

In near future, we will also focus on delivering first class support for @callstack/react-native-sandbox. It’s a new library from Callstack Incubator for running multiple, isolated React Native instances within a single application. Our goal is to ensure it works seamlessly with Module Federation through Re.Pack, so that the context and data of your mini apps (federated modules) can’t leak. Stay tuned!

‍

Insights

Learn more about Super Apps

cover

Aug 31Article

Working With the React Native Super App Showcase Repository

Explore the React Native Super App Showcase architecture: Re.Pack, Module Federation, runtime bundles, shared dependencies, and production releases.

cover

Jul 21Article

A Step-By-Step Guide to Super App Development With Re.Pack 5

Learn how to connect a React Native host and mini app with Re.Pack 5 and Module Federation, then load the remote module at runtime.

cover

Jul 2Article

Mobile Module Federation with Re.Pack: When Runtime Delivery Is Worth the Complexity

Learn how Module Federation works in React Native with Re.Pack, when it makes sense, when simpler options are better, and what teams need to validate before adopting runtime delivery.

cover

May 19Article

Using TurboModule Substitution to Build Safer React Native Plugin Systems

Learn how TurboModule substitution helps React Native plugin systems provide native capabilities while preserving sandbox boundaries.

cover

Jul 31Article

Running Multiple Instances of React Native in Sandbox

react-native-sandbox lets you run multiple React Native instances in one app. Build secure super apps and plugins with true runtime isolation, crash containment, and configurable permissions for native modules, perfect for integrating third-party code safely.

Event Cover

May 21Talk

Building Universal Super Apps With React & React Native

Discover how to build universal Super Apps using React and React Native. Join Mike Grabowski, CTO at Callstack, as he explores dynamic code delivery, native UI rendering, and how RePack bridges the gap with Module Federation.

Event Cover

May 20Live Stream

What’s New in Re.Pack 5.1: Live Overview

Explore runtime hooks, prefetching MF remotes, and more in Re.Pack 5.1. Join us live or watch the replay.

cover

May 14Article

New in Re.Pack 5.1: Preloading Remotes, Runtime Hooks, and Faster Startups

Re.Pack 5.1 introduces runtime hooks, preloading of remote modules with Module Federation, and experimental persistent cache for faster startups, plus full React Native 0.79 support.

cover

Jan 29Podcast

Mobile Microfrontends With Zephyr Cloud and Re.Pack

Get ready for faster development cycles and reduced risks when rolling out updates for mobile apps with microfrontends enabled by Zephyr Cloud and Re.Pack.

Event Cover

Jul 8Webinar

How to Scale Teams, Product Development, and Release Process With Re.Pack

Join us to learn how Re.Pack helps manage complexity in React Native apps, enables scalable teams, and boosts release processes.

cover

Nov 7Podcast

Module Federation

In the 18th episode of the React Native Show Podcast, Łukasz Chludziński, Paweł Trysła, and Zack Jackson talk about Module Federation in Webpack and Re.Pack. They also discuss some of the buzzwords related to this type of architecture, for example, super apps and micro frontends.

cover

Jul 6Podcast

Re.Pack - Bringing Webpack to React Native

This episode explores Re.Pack, an Open Source, Webpack-based toolkit to build React Native apps with the full support of the Webpack ecosystem.

cover

Mar 19Tutorial

The Hard Way vs. The React Native AI SDK Way: Stop Writing Custom Modules for Every Model

Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

cover

Mar 12Tutorial

Build Smarter Apps: Tool Calling & AI Orchestration Explained

Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

cover

Mar 5Tutorial

MLC LLM + React Native: On-Device AI Without the Pain

Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

cover

Feb 24Tutorial

Intelligent Fallbacks with Apple Intelligence in React Native

Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

cover

Feb 10Tutorial

What Is the React Native AI SDK? A Complete Intro & Quickstart

Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

cover

Jan 29Tutorial

Implementing an Android TurboModule with Kotlin

Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

cover

Jan 19Tutorial

Working with Different Threads in Swift TurboModules

Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

cover

Jan 9Tutorial

How to Add Type-Safe Constants to Swift TurboModules

Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.

cover

Dec 30Tutorial

Adding Event Emitters to Your TurboModule in Swift

Learn how to emit native events from a Swift TurboModule and subscribe to them in JavaScript, including proper memory management and Codegen integration.

cover

Dec 22Tutorial

Writing Your First TurboModule in Swift

Learn how to build a fully working TurboModule in Swift, integrate it with Codegen, and bridge it through Objective‑C inside an Expo app.