-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
When using Tailwind (v4) classes in pages or components from a theme those classes don't seem to get picked up by Tailwind when building in a package consuming the theme.
Steps to Reproduce
- Clone the template repo
- Scaffold an integration to inject the Vite Tailwind plugin (example here)
- Use a Tailwind class directly in a theme component, layout, or page (in the reproduction it is
bg-blue-500andbg-red-500relevant repro code) - Consume that theme in a project and you'll notice it isn't included by Tailwind
- You can get it to be bundled by including a class (or a string that's the same as the class) in the consumed project (relevant repro code)
Repro
Note: You may need to build and then preview the project to see the issue as I've had mix results during astro dev
https://github.com/lorenzolewis/atp-tailwind-repro
More Info
I feel like this is some Vite virtual module resolution issue (given how much amazing magic is being done under the hood here). It could also very well be an issue in the Tailwind codebase because of the virtual module layers, but I'm not sure how to further dig into it.
Metadata
Metadata
Assignees
Labels
No labels