import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], root: '.', // Use relative paths in built assets so the site can be deployed to a subfolder base: './', // Build options tuned to reduce memory usage during bundling build: { // disable source maps (reduces memory and CPU during build) sourcemap: false, // use esbuild for minification (faster and lower memory than terser) minify: 'esbuild', // do not compute compressed sizes to avoid extra memory/CPU reportCompressedSize: false, // keep CSS code-splitting enabled (default) — avoids large single CSS bundle cssCodeSplit: true, // clear output dir before build emptyOutDir: true, // raise chunk warning limit to avoid spurious warnings for large bundles chunkSizeWarningLimit: 2000 } })