import type { NextConfig } from "next"; const nextConfig: NextConfig = { ...(process.env.NODE_ENV === "production" ? { output: "standalone" } : {}), experimental: { // Tree-shake large icon/chart libs — only bundle exports that are used optimizePackageImports: ["lucide-react", "recharts"], }, webpack(config, { dev }) { if (dev) { // Persist compiled modules to disk so server restarts reuse the cache config.cache = { type: "filesystem", allowCollectingMemory: true, }; } return config; }, turbopack: {} // Add this line }; export default nextConfig;