Migrating from Re.Pack 5
Re.Pack 6 raises the minimum supported versions of Node.js, React Native, Module Federation and Reanimated, and removes APIs that were deprecated in Re.Pack 5.
Update dependencies in package.json
Update the Re.Pack plugins you use (@callstack/repack-plugin-*) to the same major version.
Minimum supported versions
The legacy architecture is no longer supported
React Native 0.82 removed the legacy architecture, so Re.Pack's native module is now built only as a TurboModule. If your app still sets newArchEnabled=false, migrate it to the New Architecture before upgrading.
Package exports are enabled by default
getResolveOptions() now sets enablePackageExports to true by default, matching Metro's default since React Native 0.79. Configs that already pass enablePackageExports: true don't need changes. If your project relies on main-field resolution, opt out explicitly:
See Module Resolution for how package exports change resolution.
Module Federation V1 was removed
ModuleFederationPluginV1 is no longer available, and Repack.plugins.ModuleFederationPlugin now points to ModuleFederationPluginV2. Follow Migrating from V1 to move your configs to Module Federation 2.0.
The Federated helpers, which only worked with V1, were removed as well:
Federated.SHARED_REACT,Federated.SHARED_REACT_NATIVEandFederated.createRemotefrom@callstack/repackFederated.createURLResolverandFederated.importModulefrom@callstack/repack/client
Removed deprecated APIs
ChunksToHermesBytecodePlugin
Use HermesBytecodePlugin instead. The options are the same.
getPublicPath
Remove the call. Re.Pack configures output.publicPath out of the box.
--webpackConfig CLI option
Use --config instead.
@callstack/repack/commands/rspack and @callstack/repack/commands/webpack
Use the unified commands. They pick the bundler based on the config file name, or the --bundler option.
OutputPlugin output options
output.bundleFilename, output.sourceMapFilename and output.assetsPath had no effect since Re.Pack 5 and are now rejected by OutputPlugin's option validation. Remove them and use the --bundle-output, --sourcemap-output and --assets-dest CLI options instead.
reanimatedModuleRules from @callstack/repack-plugin-reanimated
Use reanimated4ModuleRules instead. reanimatedModuleRules was an alias of reanimated3ModuleRules, which was removed together with Reanimated 3 support (see below).
Reanimated 3 support in @callstack/repack-plugin-reanimated
Reanimated 3 doesn't support React Native 0.82 or newer, so ReanimatedPlugin now requires react-native-reanimated 4 together with react-native-worklets, and reanimated3ModuleRules was removed. Follow the Reanimated 4 migration guide, then replace react-native-reanimated/plugin with react-native-worklets/plugin in your Babel config.


