Thanks for this awesome repo! This has saved me loads of time setting up, and is better than Sail because you don't need anything except docker on the host. This should be the documented docker process for Laravel.
Description
I was having some trouble where it would not load the vite.
Steps to Reproduce
First we start the server:
docker-compose run --rm --service-ports npm run dev
output:
VITE v5.1.5 ready in 1886 ms
➜ Local: http://localhost:5173/
➜ Network: http://172.18.0.4:5173/
➜ press h + enter to show help
LARAVEL v10.47.0 plugin v1.0.2
➜ APP_URL: http://localhost
Visit http://localhost:5173/ and get a page:
This is the Vite development server that provides Hot Module Replacement for your Laravel application.
Ok, now let's load the app at http://localhost, the vite assets cannot load:
Thanks for this awesome repo! This has saved me loads of time setting up, and is better than Sail because you don't need anything except docker on the host. This should be the documented docker process for Laravel.
Description
I was having some trouble where it would not load the vite.
Steps to Reproduce
First we start the server:
output:
Visit
http://localhost:5173/
and get a page:Ok, now let's load the app at
http://localhost
, the vite assets cannot load:Solution
We need to add
server.hmr.host=localhost
, as per the Laravel 10 Vite Docs: https://laravel.com/docs/10.x/vite#configuring-hmr-in-sail-on-wsl2vite.config.js