17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
// Every backend route lives under one of these two prefixes
|
|
// (see src/web/protected_routes/). Proxying keeps the browser
|
|
// on one origin in dev, so no CORS setup is needed here.
|
|
'/protected': 'http://localhost:8000',
|
|
'/user': 'http://localhost:8000',
|
|
},
|
|
},
|
|
})
|