- AppHost: AddViteApp(frontend) via Aspire.Hosting.JavaScript 13.4.2, WithReference(webapi)+WaitFor, inject VITE_API_BASE_URL=http://<lan-ip>:5179 at launch (computed from the active physical adapter, follows DHCP) - Pin proxyless ports: webapi http=5179 (matches SPA default), vite=5173, both bind 0.0.0.0 for LAN reachability - vite.config: server.host=true so the dev server is LAN-visible Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
423 B
TypeScript
14 lines
423 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
// Bind on all interfaces so the dev server is reachable from other devices
|
|
// on the LAN (phone/laptop) when launched via .NET Aspire. Aspire assigns
|
|
// the port; this only widens the host from localhost to 0.0.0.0.
|
|
host: true,
|
|
},
|
|
})
|