import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import { fileURLToPath, URL } from 'node:url'; export default defineConfig({ plugins: [react()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) }, }, server: { port: 5173, // Proxy in development so the browser sees one origin, matching how // production serves the API and the app together. Auth sessions are // per-origin, so a split origin in dev but not prod hides real bugs. /* * `/media` is proxied as well as `/api`, because Learn videos PIG hosts * itself are served from the API on a non-/api path. Without this entry * Vite answers the