On a brand new install of Laravel 9, the breeze generated /login and /register pages don't load the css. Upon looking at source code, vite seems to be loading the CSS (and js) using a funny url:
I don't understand why this is happening as both layout files have the same vite directive (Breeze uses guest, home uses app, but both use @vite(['resources/css/app.css', 'resources/js/app.js'])
@Sinnbeck I saw you wrote this to a different user's question and it worked for them. But I tried the same and it didn't... Maybe I did it wrong? This is how my config file looks:
I have a similar case.
Brand new install ( with Sail over WSL2 ), home page working perfect.
Breeze instalation (with Blade), npm install, npm run dev ...
Home page working fine... login can´t get CSS or JS from vite
My localhost:5173/ shows "Laravel+Vite" page
but my localhost/login cant find css on localhost:5173/resources/css/app.css (neither the app.js)
I added and removed the host configuration on vite.. no effect.
the login page tries to get 0.0.0.0:5173/resources/css/app.css
the localhost:5173 page works
if i put the "server" key on vite.config
the login page tries to get locahost:5173/resources/css/app.css
the localhost:5173 page do not work
In both cases the CSS is not loaded ... the network connection fails without any code HTTP code (net::ERR_EMPTY_RESPONDE) like theres is no server listening this port.