Files
hipctf/vite.config.ts
m0rph3us1987 1c756af238 initial commit
2026-01-07 13:27:11 +01:00

27 lines
680 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
// Directs API calls from Vite (port 5173) to Express (port 3000)
// Using 127.0.0.1 is more stable than 'localhost' in some environments
'/api': {
target: 'http://127.0.0.1:3000',
changeOrigin: true,
secure: false,
},
// Directs file download calls to the uploads folder served by Express
'/files': {
target: 'http://127.0.0.1:3000',
changeOrigin: true,
secure: false,
}
}
}
});