#How to use postcss.config.cjs with Tailwind Integration, 3.0.0-beta.x?

1 messages · Page 1 of 1 (latest)

grave dirge
#

Using postcss.config.cjs together with Tailwind Integration in Astro 1.x works great. But in Astro 2beta and the Tailwind Beta integration this does no longer work.

In other words, I'm adding PostCSS plugins like this:
https://docs.astro.build/en/guides/styling/#postcss

But in this recent PR, the Tailwind Integration changed to configure Vite directly using the inline PostCSS config option.
https://github.com/withastro/astro/pull/5717
https://github.com/withastro/astro/pull/5717/files#diff-673d1d97efad354c2b193d90a6eb2d6d27b84a3f94510eb27ca6b95353271968R69

When Vite has inline PostCSS config, Vite will no longer load a postcss.config.cjs.

Note if an inline config is provided, Vite will not search for other PostCSS config sources.
https://vitejs.dev/config/shared-options.html#css-postcss

So I'm trying to figure out, how to still be able to provide custom PostCSS configs in Astro2 + Tailwind?

west minnow
#

This has been fixed, you can update to latest an it should be good now

slow schooner
#

Hello I upgraded to astro 2.0.1 and still got the postcss issue

west minnow