To run your react vite application as https://localhost:5173 instead of https://12.7.0.0.1:5173 you can modify the vite.config.js like this:
For Backend like Laravel, be sure to also use the LAN IP instead of the IP Address.
This is an example of my vite.config.js
This will allow you to access the vite react application from any computer in your local network. In my example, I wanted to access the app from my mobile phone to test the layout of the applicaiton on a cell phone by accessing the compuer's host name or the NAT IP address.
When you make the changes, you may see a message like this on the terminal, therefore, you know its working.
9:57:03 AM [vite] vite.config.js changed, restarting server...
9:57:03 AM [vite] server restarted.
➜ Local: https://localhost:5173/
➜ Network: https://192.168.1.64:5173/
➜ Network: https://192.168.56.1:5173/
➜ Network: https://192.168.10.1:5173/
More information can be found here: https://vitejs.dev/config/server-options.html