Zephyr Codemod
The Zephyr Codemod automatically adds Zephyr integration to your existing projects. It detects your bundler and modifies your configuration to include the appropriate Zephyr plugin.
Quick Start
Options
What It Does
The codemod scans your project for bundler configuration files and automatically:
- Detects your bundler (Webpack, Vite, Rollup, etc.)
- Adds the correct Zephyr plugin import
- Updates your configuration to include Zephyr
- Shows you what changed
For Metro, configuration and publication are separate. Supported React Native CLI projects receive Zephyr-wrapped bundle-mf-host and bundle-mf-remote commands in addition to withZephyr(). Supported RNEF projects receive the Zephyr RNEF plugin, which registers the same commands.
If the codemod cannot determine the project type or safely preserve a non-standard companion configuration, it does not guess. It reports the manual React Native CLI and RNEF completion options instead of claiming publication setup is complete. Review and run one of those publication paths explicitly. See Metro configuration and publication for the required setup and upload boundary.
Supported Bundlers
- Webpack →
zephyr-webpack-plugin - Rspack →
zephyr-rspack-plugin - Vite →
vite-plugin-zephyr - Rollup →
rollup-plugin-zephyr - Rolldown →
zephyr-rolldown-plugin - RSBuild →
zephyr-rsbuild-plugin - Modern.js →
zephyr-modernjs-plugin - RSPress →
zephyr-rspress-plugin - Parcel →
parcel-reporter-zephyr - Re.Pack →
zephyr-repack-plugin - Metro →
zephyr-metro-plugin
Examples
Before:
After:
Best Practices
- Commit your changes before running the codemod
- Use
--dry-runto preview changes first - Review the diff after running to ensure correctness
- Test your build to verify everything works
- Use
--installto automatically add missing packages