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, }, })