DEV Community

Bruno Barros
Bruno Barros

Posted on

Fix: tailwind not working on Laravel 9 with Vite

If you having trouble loading your tailwind styles but 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)

brodev23 profile image

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.


webfuelcode profile image

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