cosmo/frontend/vite.config.ts

29 lines
677 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '0.0.0.0', // Listen on all network interfaces
port: 5173,
proxy: {
// Proxy API requests to backend
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
},
// Proxy upload files to backend
'/upload': {
target: 'http://localhost:8000',
changeOrigin: true,
},
// Proxy public assets to backend
'/public': {
target: 'http://localhost:8000',
changeOrigin: true,
},
},
},
})