HotupdaterHot Updater
Build Plugins

Rock Plugin

Build plugin for projects using [Rock](https://www.rockjs.dev/) framework, a React Native framework created by Callstack.

Installation

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

Configuration

interface RockPluginConfig {
  outDir?: string;      // Output directory (default: "dist")
  entryFile?: string;   // Entry file (default: "index.js")
  sourcemap?: boolean;  // Generate sourcemaps (default: false)
  hermes?: boolean;     // Use Hermes compiler (default: true)
}

Usage

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

export default defineConfig({
  build: rock({
    hermes: true,
    entryFile: 'index.js',
    sourcemap: false
  }),
  // ... other config
});

Rock framework uses Re.Pack bundler. It's recommended to use the Re.Pack plugin to set bundle ID at build time.

Install the Re.Pack plugin:

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

Add the plugin to your rspack.config.mjs:

rspack.config.mjs
import { HotUpdaterPlugin } from "@hot-updater/repack";

export default {
  // ...
  plugins: [
    new Repack.RepackPlugin(),
    new HotUpdaterPlugin() 
  ],
};

See the Re.Pack integration documentation for more details.

Key Features

  • Build plugin for Rock framework
  • Supports Hermes compilation
  • Configurable output directory and entry files