import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], // 빌드 최적화 build: { // 청크 크기 경고 제한 증가 chunkSizeWarningLimit: 1500, // 소스맵 비활성화 (프로덕션) sourcemap: false, // 빌드 최적화 minify: "esbuild", // 청크 분할 rollupOptions: { output: { manualChunks: { vendor: ["react", "react-dom", "react-router-dom"], ui: ["@mui/material", "@emotion/react", "@emotion/styled"], }, }, }, }, // 개발 서버 설정 (로컬 개발 시에만 사용) server: { host: true, port: 80, allowedHosts: ["mailbox.caadiq.co.kr"], proxy: { "/api": { target: "http://backend:3000", changeOrigin: true, }, }, }, });