Skip to content

feat(expo): add first-class Re.Pack integration - #1425

Open
whydidoo wants to merge 5 commits into
callstack:mainfrom
whydidoo:feat/expo-repack-support
Open

feat(expo): add first-class Re.Pack integration#1425
whydidoo wants to merge 5 commits into
callstack:mainfrom
whydidoo:feat/expo-repack-support

Conversation

@whydidoo

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces first-class Expo support for Re.Pack through a new @callstack/repack-expo package.

It allows Expo SDK 56 applications using prebuild/CNG to use Rspack and the existing Re.Pack runtime, including ScriptManager and Module Federation v2, without changing the core Re.Pack packages.

The package remains private while we validate the initial integration contract.

What’s included

  • An Expo Config Plugin that configures generated iOS and Android projects for Re.Pack.
  • An ExpoPlugin for Rspack that owns the required Expo/Re.Pack defaults:
    • Expo Router and plain entry resolution
    • Babel configuration
    • React Native and monorepo module resolution
    • images, density variants, fonts and XML assets
    • EXPO_PUBLIC_* environment variables
    • source maps and symbolication
    • packaged local chunks through ScriptManager
  • CLI commands for initial setup and diagnostics:
    • npx @callstack/repack-expo init
    • npx @callstack/repack-expo doctor
  • Development, native Release and EAS Build integration.
  • Expo Router support without importing Metro runtime behavior.
  • Module Federation v2 support using the existing public Re.Pack plugin and ScriptManager.
  • Expo host and Expo widget validation applications for iOS and Android.

Module Federation v2

Module Federation remains explicit and application-owned, matching regular Re.Pack behavior.

The implementation supports:

  • Expo host → Expo widget
  • Expo host → regular Re.Pack MF v2 widget
  • packaged local React.lazy() chunks alongside remote widgets
  • remotely deployed widget chunks, assets and fonts
  • platform-specific iOS and Android manifests
  • the existing ScriptManager resolver, storage and security mechanisms

Remote widgets cannot provide native dependencies. Native modules must already be installed and linked in the host application.

Native integration

@callstack/repack-expo init only updates application-owned configuration.

Native changes are applied through the Expo Config Plugin during expo prebuild. The integration does not require users to maintain custom Swift, Kotlin, Gradle or Xcode changes manually.

Development applications are launched with:

npm run repack:start
npm run repack:ios
# or
npm run repack:android

@whydidoo
whydidoo requested a review from dannyhw July 30, 2026 10:24
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f0d1727

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@whydidoo is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@whydidoo whydidoo added the area:3rd-party The issue is about 3rd party package or library. label Jul 30, 2026
@dannyhw

dannyhw commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

@whydidoo can you check the merge conflicts?

Comment thread apps/tester-expo/package.json Outdated
"expo-router": "~56.2.7",
"expo-status-bar": "~56.0.4",
"react": "19.2.3",
"react-native": "0.85.3",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently updated our react native version to "0.86.0"
also note that we have some of our package versions in catalogs in pnpm workspace
would be good to keep react native versions in sync across projects I think

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expo SDK 57 currently expects React Native 0.86.2 and React 19.2.3.
I’ve kept both Expo examples on the same Expo-compatible versions rather than forcing the default catalog versions. We could add a dedicated Expo SDK 57 catalog later to keep those versions centralized as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:3rd-party The issue is about 3rd party package or library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TRACKING] Enhanced Expo support Re.pack and its Module Federation / Micro-frontends is not working with expo

2 participants