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: { // two entries: the shareholder panel and the /admin service page, // so the service page does not pull the map and charts weight main: fileURLToPath(new URL('./index.html', import.meta.url)), admin: fileURLToPath(new URL('./admin.html', import.meta.url)), }, }, }, });