Replies: 1 comment 1 reply
-
To avoid using PostCSS with Next.js currently we'd need to write a webpack plugin to take control of how CSS is loaded, which is basically the equivalent of what we're doing in Vite. Something we're interested in exploring for sure but after prototyping pieces of it it's a bit tricky in Next.js because of server components and how Next.js generates multiple bundles. It's not possible as far as I can tell for Tailwind CSS to be a Lightning CSS plugin I'm afraid, just not the right hooks we need. We run Lightning as a separate optimization step, and even then only in production builds. In development, Tailwind doesn't use Lightning at all. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to run Tailwind 4 without PostCSS, just using the Lightning CSS and the new engine as it seems to work in the Vite based setup?
I was waiting for Tailwind 4 to be able to do just that, but it seems that for nextjs the processing still goes through PostCSS, what are the reasons for this?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions