Nx plugin for building emails with React Email.
- 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
npm install -D @nx-extend/react-email
nx g @nx-extend/react-email:initStart the React Email development server to preview your email templates:
nx serve <project-name>| Name | Type | Default | Description |
|---|---|---|---|
port |
string |
- | Port to run the development server on |
Export your email templates to static HTML files:
nx export <project-name>| Name | Type | Default | Description |
|---|---|---|---|
outputPath |
string |
- | Output path to output the build to |
nx serve my-emails --port=3000nx export my-emails --outputPath=dist/emailsAfter 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.