parcel-bundler / lightningcss

An extremely fast CSS parser, transformer, bundler, and minifier written in Rust.
https://lightningcss.dev
Mozilla Public License 2.0
6.14k stars 166 forks source link

Using LightingCSS as tailwind transformer #543

Open chrismcv opened 11 months ago

chrismcv commented 11 months ago

Hi, Apologies if this is a silly question, but I can't see anything in the docs that answers the question meaningfully.

We're using a dual build process currently... for dev we use vite + postcss + tailwind, and for prod, we use esbuild + postcss + tailwind.

We are using tailwind JIT, which I suspect makes the answer more complicated.

I'd like to replace out the postcss part with lightning css, but keep using tailwind, both in dev and prod. Is there a way to do this?

Postcss.config.js looks like this:

module.exports = {
  plugins: [require('tailwindcss'), require('autoprefixer')]
};

So I'm hoping its simple/possible.

Thanks, Chris

mayank99 commented 11 months ago

independently i came across this today which might help with this issue: https://github.com/ArnaudBarre/downwind