-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"@tailwindcss/vite": "4.0.8" and "@tailwindcss/vite": "4.0.9" have massively increased load times for the CSS in Vite. #16911
Comments
Hey! Can you post a repro? One thing I can think of is that yhe automatic content detection, which no longer works off only the Vite module graph, now scans through a bunch of unwanted files. Does your codebase have a |
Hey @philipp-spiess Not sure what you want when you say Can you post a repro? ? I am working on a Craft CMS project. Here are some (useful?) extracts... index.css @import "tailwindcss";
@import "./partials/brand.css";
@import "./partials/animation.css";
@import "./partials/grid.css";
@import "./partials/prose.css";
@plugin '@tailwindcss/forms';
@source "../../templates"; gitginore
|
Ah, sorry for not being clear enough. It would be helpful if you can create a small repository that reproduces the error and send us the link to it (e.g. via a GitHub repository). Ideally we can run the setup locally so that we can quickly iterate on it and figure out whats wrong. From the two files you posted there's nothing that stands out to me I'm afraid. What you could also try is to do a Vite build but set the |
I'm having the same issue with Running with
However, it takes ~30 seconds for the The generated app.css file is 138KB but it still shouldn't take this long to send back to the client. I can try putting a repro together when I find some spare time... |
since version 4.0.8 the sidebar of shadcnui is not working anymore and the rest of style looks different |
I have the same question :) |
@woozyking Any chance you can send us the full |
Here you go |
@woozyking Hey! Regarding your issue: the last patch release contained a fix that prevents binaries from being scanned (that resulted in a similar performance regression in a different GitHub issue). Do you mind upgrading to it and seeing if that's still an issue? If yes, I'd appreciate if you can put together a reproduction that you can share with us so we can have a look. The best guess is that somehow a file is being scanned that isn't supposed to be scanned. |
Great. I can confirm with the following version, the generate step for tailwind in vite build behaves normally "@tailwindcss/vite": "4.0.14",
"tailwindcss": "4.0.14", |
I'm still seeing the same issue, but some profiling shows that another vite plugin we're using seems to be causing the slowdown. Still trying to find a way to reproduce this in a clean project... |
I am also still seeing the issue and fixing to |
Confirming that versions >= 4.0.8 are extremely slow (tested on MacBook M1 Pro). |
So I have noticed drastically increased load times when using Vite and Tailwind when updating to "@tailwindcss/vite": "4.0.8" and "@tailwindcss/vite": "4.0.9".
"@tailwindcss/vite": "4.0.8" and "@tailwindcss/vite": "4.0.9"

"@tailwindcss/vite": "4.0.7" and lower.

Not sure what is causing this.
Happy to share more information about my setup or debug further with instructions.
Thanks
The text was updated successfully, but these errors were encountered: