Spaces:
Sleeping
Sleeping
| // vite.config.ts | |
| import { defineConfig } from 'vite' | |
| import react from '@vitejs/plugin-react' | |
| export default defineConfig({ | |
| plugins: [react()], | |
| server: { | |
| proxy: { | |
| // proxy any /api/* request to localhost:8080 | |
| '/api': { | |
| target: 'http://localhost:8080', | |
| changeOrigin: true, | |
| secure: false, | |
| // rewrite: (path) => path.replace(/^\/api/, '/api'), // not needed if same prefix | |
| }, | |
| }, | |
| }, | |
| }) | |