Skip to content

Heading not showing on localhost when wrapped with Tailwind component #1420

Closed
@devklepacki

Description

@devklepacki

Describe the Bug

Heading component is not rendering when it's inside a Tailwind component. I was building a new email and was fighting with Heading not displaying (not rendering in DOM at all). Once I've removed the Tailwind component wrapping my template the Heading appeared. The same happens with newly created project using yarn create email.

  • There is no Join Enigma on Vercel heading visible right under the logo

Screenshot 2024-04-20 at 11 29 00

  • While it's in the React code:

Screenshot 2024-04-20 at 11 28 49

  • It's also not in the rendered HTML code snippet:
<table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin-top:32px">
  <tbody>
    <tr>
      <td><img alt="Vercel" height="37" src="/static/vercel-logo.png" style="display:block;outline:none;border:none;text-decoration:none;margin-top:0px;margin-bottom:0px;margin-left:auto;margin-right:auto" width="40" /></td>
    </tr>
  </tbody>
</table>
<p style="font-size:14px;line-height:24px;margin:16px 0;color:rgb(0,0,0)">Hello <!-- -->alanturing<!-- -->,</p>
<p style="font-size:14px;line-height:24px;margin:16px 0;color:rgb(0,0,0)"><strong>Alan</strong> (<a href="mailto:[email protected]" style="color:rgb(37,99,235);text-decoration:none;text-decoration-line:none" target="_blank">[email protected]</a>) has invited you to the <strong>Enigma</strong> team on<!-- --> <strong>Vercel</strong>.</p>
  • Once the Tailwind component is removed, the Heading appears

Screenshot 2024-04-20 at 11 30 56

Which package is affected (leave empty if unsure)

@react-email/heading, @react-email/tailwind

Link to the code that reproduces this issue

https://github.com/devklepacki/react-email-reproduction

To Reproduce

  • Download the project (from reproduction or with yarn create email, install dependencies and run it
  • On localhost go to vercel-invite-user email template
  • There is no Join Enigma on Vercel Heading visible right under the logo

Expected Behavior

Heading contents should be shown when used inside Tailwind component

What's your node version? (if relevant)

v20.11.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions