Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

warmwhisky's avatar

Laravel Vite missing Tailwind classes

It would seem that a fresh install of Laravel 9.19 does not include all tailwind classes as it did before.

After running

npm run dev

only 2 grid-cols-* are available

grid-cols-1
grid-cols-6

I need all grid-col classes.

How do I make the new laravel install vite plugin do this with tailwind?

There are numerous other classes missing too.

0 likes
9 replies
Sinnbeck's avatar

Tailwind removes any classes that you aren't using. So add the classes to a blade file, count to 2, and reload the page

1 like
Snapey's avatar

Version 2 supplied the whole class library and then when building for production, unused classes were removed

Version 3 uses JIT compiler to only include the classes you are using in your blade files.

Run npm run build if you want the files created and placed in your public folder. Otherwise, run npm run dev and leave it running for hot reloading each time you make a change.

warmwhisky's avatar

Thanks guys, @sinnbeck I was stupidly creating grid-cols dynamically like this grid-cols-{{$col_count}} and scratching my head for way tooo long.

@snapey I guess only having the classes you've used is pretty useful if you know the classes by heart, but would you know if I could get everything loaded so I can use autocomplete from PhpStorm?

Snapey's avatar

sorry, don't know. I'm a vscoder and there is a plugin. I'd be surprised if there was not one for phpstorm

warmwhisky's avatar

@Sinnbeck Thanks for confirmation. Its a shame they bundle the software with the tailwind plugin as it makes my projects crash and when I enabled it yesterday it stopped all autocompletion for tailwind.

Please or to participate in this conversation.