Open the cmd as administrator and run:
netsh interface portproxy add v4tov4 listenaddress=192.168.0.134 listenport=5173 connectaddress=172.29.30.127 connectport=5173
-
listenaddress
= Your PC local IP Address got fromipconfig
-
listenport
andconnectport
= Vite default port -
connectaddress
= The WSL hostname IP got fromwsl hostname -I
Got this information from this comment.
Inside package.json
create a new script: "dev:local": "vite --host 0.0.0.0"