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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user