Closed dennisbaum closed 2 years ago
Thanks for the PR! Great idea. I will think of a sustainable way of implementing those changes, without distracting too much from the core logic for new users.
Hey Johann, thanks for considering! I think a good way to achive that, is to expose the host in vite. that shouldn't distract anyone i guess. The protocol should be in the env.example as http i think. The variable protocol would also be nice and important for some docker-setups with local https. if you don't add a custom devServer-path in the config, it stays as it is. nothing changes. i am looking forward. thx
Sorry for the late reply! Sat down and reviewed this rather short PR. What a great addition to the setup! Thanks.
Merged manually in https://github.com/johannschopplich/kirby-vue3-starterkit/commit/e38472d39cad37023f91fe8bbea933a24ebdfbaa.
Hey Johann,
would be nice if we can access the dev machine in the same (W)LAN by mobile devices and also recieve the vite hmr. Therefore i slightly changed the devserver-settings and exposed the host in vite. I added my local IP to KIRBY_DEV_HOSTNAME and added a KIRBY_DEV_PROTOCOL. So it's possible to start PHP without protocol and VITE with protocol. php -S didn't work with protocol. Vite didn't work without. I also added VITE_DEV_PORT to be able to change that dynamicly by .env and add them all in the kirby config. That results in loading vite:client an vite:js from the dev machine and hmr, when i access the site by IP from my mobiles in the sam WLAN. If you not set devServer in kirby:config, the system should still works like it works before with 127.0.0.1...
Cheers, Dennis