Expo Svelte
GitHub

Your app must be on Expo SDK 57 (React Native 0.86) and use pnpm 12.3.4 or newer: Expo Svelte's patches are pnpm's, so a project on npm or Yarn moves to pnpm first. Use Node 24 LTS (24.3 or newer), Node 22.17 or newer, or Node 26 or newer, not Node 25 (Troubleshooting).

1. Take the React app out of the way

Expo Svelte has its own entry point and router, and runs no React. Remove:

  • the React entry: App.tsx, an index.js that calls registerRootComponent, or expo-router/entry as "main"
  • expo-router: its app/ directory, and "expo-router" in the plugins of app.json
  • your React components and hooks

Keep app.json with its name, identifiers, icons, permissions and other plugins, your assets/, eas.json, your own Expo modules in modules/, and every library that doesn't need React (Native libraries).

2. Allow esbuild and pin two packages

The first install already needs these settings. If your project isn't a pnpm workspace, pnpm-workspace.yaml holds just them:

pnpm-workspace.yaml
allowBuilds:
  esbuild: true
overrides:
  expo-modules-core: 57.0.23
  "@react-native/metro-config": 0.86.3

Configuration says why each is there.

3. Install the library

sh
pnpm add expo-svelte@next

4. Run init

expo-svelte init works in an Expo project as it does in a SvelteKit one. It sees there is no SvelteKit, leaves Vite alone and doesn't install SvelteKit:

sh
pnpm exec expo-svelte init --dry-run    # see what it would change
pnpm exec expo-svelte init

It installs the Svelte build Expo Svelte needs and the native dependencies at the right versions, copies and declares the patches, writes metro.config.cjs, adds its plugin to your app.json, sets "main", adds the scripts and writes a first screen. A metro.config.cjs or "main" of your own is left as it is, and the change is printed for you to make. Configuration shows every change, if you'd rather make them by hand.

5. Generate the native project and run

Your app may already have android/ or ios/ folders from before. Generate them again, so that Expo Svelte's plugin is applied:

sh
pnpm exec expo prebuild
pnpm exec expo-svelte doctor
pnpm android        # or: pnpm ios

doctor should end with 0 failed. Then write your screens: Routing explains where they go.

Type to search the guide.