DEV Community

Vinay Nain
Vinay Nain

Posted on

Tailwind CSS v4 utility classes not working with Next.js 15 --turbopack flag

  • Problem: Layout classes (flex, justify-center) work but utility classes (bg-colors, w-full, h-*) don't generate

  • Environment: Next.js 15.4.5, Tailwind CSS v4, with --turbopack flag

  • Solution: Remove --turbopack from dev script

  • Root cause: Turbopack doesn't fully support Tailwind CSS v4 yet

  • Temporary workaround: Use regular Next.js dev server until compatibility improves

Hope this helps :)

Top comments (1)

Collapse
 
likithdeveloper profile image
Likith | MERN👨‍💻

custom classes are not working for me, any suggestion? like text-primary, bg-secondary etc