Build Plugins
Bare (CLI) Plugin
Build plugin for React Native CLI projects (non-Expo). Bundles your React Native app using the Metro bundler.
Installation
npm install @hot-updater/bare --save-devConfiguration
interface BarePluginConfig {
outDir?: string; // Output directory (default: "dist")
entryFile?: string; // Entry file (default: "index.js")
sourcemap?: boolean; // Generate sourcemaps (default: false)
enableHermes: boolean; // Use Hermes compiler (required)
}Usage
import { bare } from '@hot-updater/bare';
import { defineConfig } from 'hot-updater';
export default defineConfig({
build: bare({
enableHermes: true,
sourcemap: false,
entryFile: 'index.js'
}),
// ... other config
});Babel Configuration
Add the Hot Updater Babel plugin to your babel.config.js:
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: ['@hot-updater/babel-plugin'],
};Key Features
- Uses React Native CLI's Metro bundler
- Automatic Hermes bytecode compilation when enabled
- Minification handled by Hermes (disabled when Hermes is enabled)
- Supports custom entry files and output directories