c0382117b807295844c7d3efea4ed004f2a41101
`vite.config.ts` read `VITE_DEV_PROXY_TARGET` / `VITE_DEV_GRPC_PROXY_TARGET` straight from `process.env`, so the gateway-override knob only worked when the variable was exported in the shell that ran `pnpm dev`. Per-developer `.env.development.local` files (the documented way to override) were silently ignored by the config: Vite auto-populates `import.meta.env` for client code from those files, but the config itself runs in Node and has to call `loadEnv` explicitly. Switch the config to the function-form + `loadEnv` so every `VITE_*` entry in any `.env*` file reaches both client code and the config. Now adding `VITE_DEV_PROXY_TARGET=http://localhost:18080` to `.env.development.local` actually retargets the proxy, no shell gymnastics required. While there, introduce `VITE_DEV_HOST` as an opt-in for wider listener binding: unset (default) keeps Vite's loopback-only behaviour; `true`/`1`/`yes` flips to "all interfaces" (`0.0.0.0` + IPv6); any other string is passed through verbatim to pin a specific LAN address. Useful when reaching the dev server through SSH port forwarding, a VM, or a container needs a non-loopback bind, and intentionally opt-in so an unattended `pnpm dev` on a laptop never exposes the unauthenticated dev surface to the LAN by accident. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Description
No description provided
Languages
Go
61%
TypeScript
31.6%
Svelte
6.5%
JavaScript
0.3%
Makefile
0.3%
Other
0.3%