2025-11-27 05:16:19 +00:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
2025-11-27 10:14:25 +00:00
|
|
|
server: {
|
|
|
|
|
host: '0.0.0.0', // Listen on all network interfaces
|
|
|
|
|
port: 5173,
|
2025-12-02 16:34:20 +00:00
|
|
|
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,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-11-27 10:14:25 +00:00
|
|
|
},
|
2025-11-27 05:16:19 +00:00
|
|
|
})
|