Files
av-planner/vite.config.ts
aarbitandClaude Sonnet 5 5e8b09f6e2 Fix dev server not listening on 127.0.0.1
Vite's default host resolves "localhost" to the IPv6 loopback (::1)
on this machine, so it never actually bound 127.0.0.1 -- but that's
the exact address Supabase Auth's email confirmation links redirect
to (config.toml uses 127.0.0.1 throughout). Binding explicitly to
127.0.0.1 fixes confirmation links without needing to hand-edit them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
2026-09-06 23:04:07 -05:00

23 lines
966 B
TypeScript

import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
// Pinned (rather than Vite's default floating port) so local Supabase
// Auth's redirect allow-list (supabase/config.toml) stays valid instead of
// silently breaking if 5173 happens to be busy and Vite picks another one.
// Host is explicit too: Vite's default "localhost" resolves to the IPv6
// loopback (::1) on this machine, so it never actually listens on
// 127.0.0.1 — but that's exactly the address Supabase Auth's email
// confirmation links redirect to (config.toml uses 127.0.0.1 throughout,
// matching Supabase's own convention). Binding here to 127.0.0.1 instead
// of leaving it to resolve is what makes those links actually work.
server: {
host: '127.0.0.1',
port: 5173,
strictPort: true,
},
})