import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' const AUTH_BACKEND = 'http://auth-service:8080' // auth-service const CRM_BACKEND = 'http://crm-rest-api:8082' // crm-rest-api const OPR_BACKEND = 'http://opr-rest-api:8083' // opr-rest-api // https://vite.dev/config/ export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { // /auth-service/* -> http://localhost:8080/auth-service/* '/auth-service': { target: AUTH_BACKEND, changeOrigin: true, secure: false, }, // /crm-rest-api/* -> http://localhost:8081/crm-rest-api/* '/crm-rest-api': { target: CRM_BACKEND, changeOrigin: true, secure: false, }, // /opr-rest-api/* -> http://localhost:8083/opr-rest-api/* '/opr-rest-api': { target: OPR_BACKEND, changeOrigin: true, secure: false, }, }, }, })