HotupdaterHot Updater
Build Plugins

Expo Plugin

Build plugin for Expo projects. Bundles your Expo app using Expo's native export command.

Installation

npm install @hot-updater/expo --save-dev

Configuration

interface ExpoPluginConfig {
  outDir?: string;      // Output directory (default: "dist")
  sourcemap?: boolean;  // Generate sourcemaps (default: false)
}

Usage

import { expo } from '@hot-updater/expo';
import { defineConfig } from 'hot-updater';

export default defineConfig({
  build: expo({
    sourcemap: false
  }),
  // ... other config
});

Expo Configuration

Add the plugin to your app.json file as shown below:

app.json
{
  "expo": {
    "plugins": [
      [
        "@hot-updater/react-native", 
        { 
          "channel": "production"
        } 
      ] 
    ]
  }
}

Run prebuild to apply the changes:

npx expo prebuild

Run the following command to customize your Babel configuration:

npx expo customize babel.config.js

Add the following to your babel.config.js file:

babel.config.js
module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: [
    'hot-updater/babel-plugin', 
  ],
};

Key Features

  • Uses Expo's expo export:embed command
  • Auto-detects Hermes from app.json configuration
  • Supports both managed and bare Expo workflows
  • Compatible with Expo prebuild for native builds
  • Automatically configures bundler based on Expo settings