Skip to content

Using @tailwindcss/vite breaks updates on imported CSS #17339

@vladmoroz

Description

@vladmoroz

What version of Tailwind CSS are you using?

v4.0.15 (latest)

What build tool (or framework if it abstracts the build tool) are you using?

Vite 6.2.2 (latest)

Reproduction URL

https://codesandbox.io/p/devbox/x3r86q

Describe your issue

Initial setup:

  • Import Tailwind and another CSS file(s) into the root CSS file

Steps to reproduce:

  1. Edit index.html (may be a change to JS/JSX files too)
  2. Edit imported.css
  3. Outdated CSS will be served until another change to index.html or index.css is made, or until the server is restarted. Page refresh doesn't serve the latest CSS either.

CSS changes work fine without @import "tailwindcss". It also works when using @tailwindcss/postcss instead of the Vite plugin.

Might be related
#16764

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions