dana-medical-site/web/vite.config.js
2026-10-14 13:33:13 +00:00

18 lines
509 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// В разработке фронт и API живут на разных портах; прокси делает их одним origin,
// поэтому CORS не нужен ни здесь, ни в бэкенде.
const API = process.env.DANA_API || 'http://127.0.0.1:8080';
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/api': API,
'/media': API,
},
},
});