-
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
[v4] [email protected] postcss broken production build space-{x,y}-*, divide-{x,y}-* #16147
Comments
same here! |
I'm almost certain this isn't an issue caused by Tailwind. Can you try the following, this seemed to have fixed the issue on my projects. To use tailwind v4 with the angular cli or nx you currently have to override the postcss rules by creating an Can you change the content of that file to the following: {
"plugins": {
"@tailwindcss/postcss": {
"optimize": {
"minify": true
}
}
}
}
|
@Owain94 yeap, that did the trick for me too! Thanks! |
I'm not sure why this works, I'm not too familiar with the angular build process. When disabling just the angular style optimizations and leaving all other optimizations turned on, the css output will NOT have the invalid CSS code. So it seems that the issue is caused by the css processor the angular cli is using. |
This is most likely due to vitejs/vite#18974, which is fixed and included in esbuild v0.25.0 which is a breaking change, and probably one that needs Angular to be updated to support first. |
@Owain94 Thank you very much! The spaces in production mode were broken, but now Angular 19 + Tailwind v4.0 is working. |
What version of Tailwind CSS are you using?
What build tool (or framework if it abstracts the build tool) are you using?
What version of Node.js are you using?
What browser are you using?
What operating system are you using?
Reproduction URL
Steps to reproduce:
----
----
Describe your issue
Install fresh angular project and add tailwind to it. Try "serve". It works fine. But when u create production build it compiles with some wrong selectors. Generally I found broken selectors which are using :where in their query. It just reorders them.
Check next examples:
Testing selector without tailwind with angular
I tried to add code:
to style.css file and create production build. And it works fine. It just doesn't work when tailwind/postcss adds it
The text was updated successfully, but these errors were encountered: