I wanted to try out Sail on my Windows machine, however, after installing Breeze on a brand new installation of Laravel and running sail npm run dev
I received a 404 in the browser for http://localhost/css/app.css
and http://localhost/js/app.js
when navigating to http://localhost/login
on my Windows host.
- Laravel Vite Plugin Version: v0.6.0
- Laravel Version: v9.19
- Node Version: v16.18.0
- NPM Version: v8.19.2
- Host operating system: Windows
- Web Browser & Version: Firefox 106.0.2 (64-bit)
I am able to navigate to http://localhost:5173/
in the browser which displays the informative message, so we know that it is working. When using inspect element on the /login
page the following URLs are returned as a 404: http://localhost/css/app.css
& http://localhost/js/app.js
.
In previous attempts I did try adding the following snippet to my vite.config.js
file, however, it made no difference and the problem persisted.
server: {
hmr: {
host: 'localhost',
},
},
This is a fresh install of Docker, WSL2 and Laravel with Breeze so in theory, it should all be working, but clearly, something is awry.
The result is seeing this: https://i.stack.imgur.com/aRZws.png
If anybody could point me in the right direction I would really appreciate it!