Tailwind V4 + Tanstack Starter with Tailwind Vite instead of postcss
Any idea why we still need a
postcss.config.ts
for tanstack starter even I have added the vite.config.ts.
Since we're using @tailwind/vite
the postcss could be ignored.
vite.configs.ts
postcss.config.ts (Can't be removed!)
__root.ts
index.css
5 Replies
unwilling-turquoise•5mo ago
you shouldnt need postcss, @tailwindcss/vite is enough. i think you need to set the source path in index.css, see here:
https://tailwindcss.com/docs/detecting-classes-in-source-files#setting-your-base-path
e.g.
and i have a template with this setup for reference:
https://github.com/dotnize/react-tanstarter
fair-roseOP•5mo ago
Ah thanks! I put them in to the vite.config.ts instead of app.config 🙏
Nice one! I'm currently building some app too with it. Was looking for a nuxt in the react world and found it. But I'm bit worried about the ssr seems to be still in beta
variable-lime•5mo ago
no, remove the vite.config.ts fully
everything needs to be in app.config.ts
for now at least, until we have removed vinxi
fair-roseOP•5mo ago
Yeah i meant i put them in the vconf before. Now in app config it works thx
mute-gold•4mo ago
Has something changed in this setup? I have the same problem and adding
source("../../");
didn't help 😦