DEV Community

Bruno Barros
Bruno Barros

Posted on • Updated on

Fix: tailwind not working on Laravel 9 with Vite

If you having trouble loading your tailwind styles and everything looks fine.

Try to add this line on your vite.config.js, it solve the problem for me.

Image description

This error happens when Vite doenst recognize the localhost as a server/host.

Top comments (2)

Collapse
 
webfuelcode profile image
webfuelcode

I was working on laravel 10 with tailwind CSS, where I see styles are broken.

Collapse
 
brodev23 profile image
brodev23

yes its issues I tried both terminologies rather with vite and Using Laravel Mix. Tailwind get installed. But classes are not working properly. Hope this thing will solve in future. if it's done. than the work will be ease.

tailwindlaravelissues