React + Rsbuild
- We expect you to have finished our Get Started guide.
- Have our browser extension installed in your browser.
Overview
Rsbuild is a Rspack-based build tool for the web that provides a fast and modern development experience. This guide shows you how to integrate Zephyr Cloud with your Rsbuild React application.
Setup
1. Create a new Rsbuild project
Select these options:
Navigate to your project:
2. Install Zephyr Rsbuild Plugin
3. Configure Rsbuild
Update your rsbuild.config.ts file:
4. Build and Deploy
The first time you initiate a build with Zephyr, it will prompt you to log in by directing you to the Zephyr website. This login is required only on your first build; subsequent builds will not require a login.
We may require you to log in again if you removed your Zephyr configuration file ~/.zephyr locally.
Your application will be automatically deployed to Zephyr Cloud during the build process.
Module Federation Support
To add Module Federation support to your Rsbuild application:
1. Install Module Federation Plugin
2. Configure Module Federation
Update your rsbuild.config.ts:
Advanced Configuration
You can pass options to the Zephyr plugin:
Next Steps
- Explore Module Federation Guide for advanced microfrontend patterns
- Learn about Environment Management for different deployment stages
- Set up GitHub Automations for CI/CD integration
Troubleshooting
If you encounter issues:
- Build fails: Ensure you have the latest version of
zephyr-rsbuild-plugin - Module Federation errors: Make sure the Zephyr plugin is added after the Module Federation plugin
- Authentication issues: Check your Zephyr Cloud authentication with our browser extension
For more help, visit our Discord community or check our error codes documentation.