fix(mobile): default h5 dev proxy to local backend on 8080

Bare npm run dev (including hosted preview sessions) has no portless
route, so the previous default target https://wygj-api.localhost was
unreachable and every API call failed with HTTP 500. scripts/dev.sh now
passes VITE_PROXY_TARGET explicitly, keeping the portless flow intact.
This commit is contained in:
2026-07-20 13:55:50 +08:00
parent 6f2159db73
commit 5184672b61
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ PIDS+=("$!")
if using_portless_mobile; then
portless alias --remove wygj-mobile-uni >/dev/null 2>&1 || true
portless run --name wygj-mobile-uni --force npm --prefix mobile-uni run dev &
VITE_PROXY_TARGET="${VITE_PROXY_TARGET:-https://wygj-api.localhost}" portless run --name wygj-mobile-uni --force npm --prefix mobile-uni run dev &
else
./scripts/dev-mobile.sh &
fi