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-devConfiguration
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
});Re.Pack Integration (Recommended)
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-devAdd the plugin to your 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