import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ plugins: [react()], // Forward requests to /bff/api to another server (like json-server) server: { proxy: { '/bff': { target: 'http://localhost:8050', changeOrigin: true, // Rewrites the host header to match the target secure: false, // Allows self-signed SSL certificates for HTTPS targets // Strips out '/bff' before passing the request to the target server rewrite: (path) => path.replace(/^\/bff/, ''), } } } })