Skip to content

Issue with latest tailwind (4.0.8) - styles disappear / not generated by tailwindΒ #603

@andrienko

Description

@andrienko

The issue

I am using tw4 in my vite project, with vite plugin. In the project itself it works as expected. In ladle it used to work before, but all of a sudden it stopped (still works in main app tho) after I updated my deps - tailwind just does not generate the styles needed by components, but generates ones used by ladle (added via .ladle/components.tsx.

There is nothing specific about ladle's config, it uses the same configs and roughly same styles as the main app.

Not sure if it is a ladle issue - or rather a tailwind issue, but as main app works and ladle doesn't - I suppose there is something specific either with ladle or how I am using it.

Workaround

Reverting tailwindcss and @tailwindcss/vite from 4.0.8 back to 4.0.6 and locking versions helps.

Reproduction

Was unable to start it in stackblitz (as tailwind apparently needs a native extensions, and they are forbidden in stackblitz)

Therefore I created a repo: https://github.com/andrienko/ladle-issue-reproduction

(it is a stripped down version of my setup, with all important stuff remaining, in case something is wrong with my setup)

Environment

Reproduces on windows 11 / macos ventura / arch 2025.02.01, and in latest chrome/firefox.
Doubt the environment is relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions