martonlederer / esbuild-plugin-postcss2

Use postcss with esbuild
MIT License
33 stars 19 forks source link

Using with Tailwind #1

Open johanbrandhorst opened 3 years ago

johanbrandhorst commented 3 years ago

Hi, thanks for this plugin! I'm wondering if this allows using esbuild with the tailwind CSS processor?

martonlederer commented 3 years ago

I have not tried it with tailwind css. If there's a postcss-plugin for it, than yes, just put it in the plugins option. If not, I can take a look, or you can also submit a pull request :)

johanbrandhorst commented 3 years ago

I'm going to try it using https://tailwindcss.com/docs/installation#installing-tailwind-css-as-a-post-css-plugin as a guide, but I'm very new to this space.

Zertz commented 3 years ago

I confirm that it works! Here's an example.

It's slow as is becaue Tailwind is so large out of the box but I found switching to @tailwindcss/jit helps a lot.

johanbrandhorst commented 3 years ago

@Zertz awesome, thanks for sharing, I also got it working as a postcss plugin but it was slowing down my build enough that I didn't care for it 😂. Thanks for the example, I will take a look!

Zertz commented 3 years ago

Yeah, without their new JIT plugin it's barely usable

ferdicus commented 2 years ago

why would you remove the example though 😭