import { fileURLToPath, URL } from 'node:url'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { '/api': { target: process.env.API_URL ?? 'http://localhost:4000', changeOrigin: true, }, }, }, build: { outDir: 'dist', chunkSizeWarningLimit: 1200, rollupOptions: { input: { // Одна точка входа: служебное стало разделом панели и подгружается // отдельным куском по требованию (28.08.2026). main: fileURLToPath(new URL('./index.html', import.meta.url)), }, }, }, });