Closed
Description
Describe the Bug
I'm not sure if it's a bug or my specific usage of the react-emal, but everything worked as expected before "react-email": "2.0.0"
. Last working version is 1.9.1.
I want to see pre-rendered emails in the preview so my export default function
is an output of the render
utility.

Which package is affected (leave empty if unsure)
react-email
Link to the code that reproduces this issue
https://github.com/resend/react-email
To Reproduce
Here is an example of my email:
import { Text, Tailwind, Head, Body, Html, render } from '@react-email/components';
import * as React from 'react';
import { CustomTailwindConfig } from './type_system/styles/tailwind.config';
export function Template(props) {
const { cardText } = props;
return (
<Tailwind
config={CustomTailwindConfig}>
<Head />
<Body
className="bgColor-body">
<Text>
{cardText}
</Text>
</Body>
</Tailwind>
);
}
export function Email() {
const emailHtml = render(
<Template
cardText="Test"
/>, {
pretty: false,
}
);
const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
const rawEmail = emailHtml.replace(doctype,'');
return (
<Html dangerouslySetInnerHTML={{ __html: rawEmail }}></Html>
);
}
export default Email;
Expected Behavior
Just a working desktop & source preview:


What's your node version? (if relevant)
18.17.0