In my case, I reverted to the postcss install method and removed the tailwind vite plugin.
https://v3.tailwindcss.com/docs/installation/using-postcss
It was because the vite plugin method expected a css config not a js config