Add npm run dev:lan for phone testing over the LAN
Adds a dev:lan script (vite --host) so testing on a real device doesn't require permanently changing vite.config.ts's default 127.0.0.1-only binding. Pairs with a small supabaseClient change: when the configured Supabase URL is local (127.0.0.1/localhost), the client now swaps in whatever hostname the page itself was loaded from, so a phone hitting the dev server's LAN IP gets API calls routed to that same IP automatically — no more hand-editing VITE_SUPABASE_URL per network. Never touches a real production Supabase URL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev:lan": "vite --host",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "oxlint",
|
||||
"preview": "vite preview",
|
||||
|
||||
Reference in New Issue
Block a user