DEV Community

Discussion on: Tailwind CSS User? Read this!

Collapse
 
psnehanshu profile image
Snehanshu Phukon • Edited

I am working on a Next.js + Tailwind project. In local everything works fine, but after building, some classes aren't included in the bundle, and thus my site looks little different in production. It turns out that it is because of PurgeCSS, but I couldn't fix it, hence I just disabled it altogether. I haven't also done any string concatenation in class names, so PurgeCSS should have been able to pick them up, I don't know what's wrong.

Does your tool takes care of this? Will it prevent used classes from being excluded from the production build?

Collapse
 
msaaddev profile image
Saad Irfan

Hey! This tool just sets up different apps, for instance, Next.js app with Tailwind according to the official documentation.

According to official documentation. we need to update purge value from tailwind.config.js to remove unused styles in production if we want to. I have implemented this thing. So I am not sure if this tool is going to help you out much.