Skip to content

Tailwind not parsing the rendered children from components #1021

Closed
@lunoob

Description

@lunoob

Describe the Bug

Before version 0.0.8, the following code is working normally

<Tailwind>
  <Template />
</Tailwind>

After version 0.0.8, I found that it only analyzes Component with the Children attribute

// it work fine
<Tailwind>
   <Component className="text-[100px]">React Email</Component>
</Tailwind>

// it not work for <div>
<Tailwind>
   <Component className="text-[100px]">
        <div className="text-red">Color</div>
        React Email
   </Component>
</Tailwind>

Which package is affected (leave empty if unsure)

@react-email/tailwind

Link to the code that reproduces this issue

example in codesandbox

To Reproduce

I compared the latest version and the source code of version 0.0.8, and found that the 0.0.8 version was replaced by the entire HTML, while the latest version only analyzes Children after the version 0.0.8.

0.0.8
image

0.0.8+
image

Expected Behavior

it can be parse the whole template component

What's your node version? (if relevant)

No response

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