Metro (React Native)
Deploy your React Native applications with Module Federation to Zephyr Cloud using Metro bundler. The Zephyr Metro plugin integrates seamlessly with Metro's build process and enables micro-frontend architectures for React Native applications.
- Finished our Prerequisites setup guide
- Installed our Chrome extension
- npm >=10
- node >=18
- ruby >= 3.3.2
This detects your bundler and configures Zephyr automatically. Learn more →
For manual setup, continue below.
Installation
Install the Metro plugin and required dependencies in your project:
Module Federation with Metro
Metro bundler supports Module Federation through the @module-federation/metro package, allowing you to create host and mini applications (remotes) in React Native.
Mini Application (Remote)
Mini applications expose modules to be consumed by host applications:
React Native CLI Configuration
Create or modify react-native.config.js to enable bundling with Zephyr:
Bundle Mini Application
Bundle your mini application for different platforms:
Host Application (Consumer)
Host applications load and orchestrate mini-applications:
Zephyr Dependencies
Configure Zephyr dependencies in your host application's package.json:
For more details, see Remote Dependencies.
Next Steps
- Check out our Metro Tutorial for a complete walkthrough
- Explore the example repository for working examples
- Learn about Tags & Environments for managing deployment stages
- Review End-to-End Testing for testing federated applications