DEV Community

Bruno Barros
Bruno Barros

Posted on • Edited on

2 2

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

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Retry later