Files
website/client/vite.config.js
whitlocktech 6f55c516c7 Document full-stack setup; fix dev proxy; drop stray temp script
- README rewritten for the completed frontend: full setup/run instructions
  (Docker Compose, local dev with hot reload, prod build), pages/routes,
  API endpoints, and a consolidated environment-variable reference
- Vite dev proxy now targets 127.0.0.1 (avoids the Windows IPv6-localhost
  pitfall where the SPA could not reach the IPv4-bound API)
- Remove server/_setup.ps1 (a scratch script accidentally committed in the
  previous frontend commit) and gitignore _*.ps1 scratch files

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 02:14:44 -05:00

20 lines
547 B
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// In dev, proxy the API + uploads to the Express server so the SPA stays
// same-origin (cookies work) and matches the production setup where Express
// serves the built client.
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/api': { target: 'http://127.0.0.1:3000', changeOrigin: true },
'/uploads': { target: 'http://127.0.0.1:3000', changeOrigin: true },
},
},
build: {
outDir: 'dist',
},
})