@nx-extend/react-email
February 20, 2026 · View on GitHub
Nx plugin for building emails with React Email.
Features
- Build and preview emails using React components
- Live development server for email templates
- Export emails to static HTML
- Full TypeScript support
- Integration with Nx workspace
Setup
Install
npm install -D @nx-extend/react-email
nx g @nx-extend/react-email:init
Usage
Serve
Start the React Email development server to preview your email templates:
nx serve <project-name>
Available options:
| Name | Type | Default | Description |
|---|---|---|---|
port | string | - | Port to run the development server on |
Export
Export your email templates to static HTML files:
nx export <project-name>
Available options:
| Name | Type | Default | Description |
|---|---|---|---|
outputPath | string | - | Output path to output the build to |
Examples
Start Development Server
nx serve my-emails --port=3000
Export Email Templates
nx export my-emails --outputPath=dist/emails
Project Structure
After initialization, your project will typically have the following structure:
my-emails/
├── src/
│ └── emails/
│ └── welcome.tsx
└── project.json
Create email components in the src/emails directory using React Email components.