Skip to content

TW config plugins are not respected anymore in @react-email/components@1.0.3Β #2770

@s-lukashenka-micoworks

Description

@s-lukashenka-micoworks

What versions are you using? (if relevant)

@react-email/components@1.0.3, react-email@5.1.1

Describe the Bug

In @react-email/components@1.0.3 it looks like the custom plugins that I have defined are no longer respected.
Roughly I have my email-specific TW config defined inside tailwind.config.ts like

export const emailConfig: Config = {
  content: ["./src/emails/**/*.{js,ts,jsx,tsx}", "./src/components/emails/**/*.{js,ts,jsx,tsx}"],
  theme: sharedTheme,
  plugins: [emailUtilities],
  presets: [pixelBasedPreset],
};

Am I doing something wrong?

What is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

A link to a GitHub repository minimal reproduction. Not your entire project, just the code necessary to reproduce the issue. Try going from the starter npx create-email@latest and adding only what's needed to cause the issue. If you don't share a reproduction, we might close the issue or it will take significantly longer for things to get sorted out.

To Reproduce

Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue, based on the linked minimal reproduction. Screenshots can be provided in the issue body below. If using code blocks, make sure that syntax highlighting is correct and double check that the rendered preview is not broken.

Expected Behavior

Custom plugins defined like

const sharedUtilities = {
  ".btn": {
    "@apply rounded-full justify-center items-center inline-flex": {},
  },
};

are respected.

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