import type { NextConfig } from "next"; const nextConfig: NextConfig = { experimental: { optimizePackageImports: ["lucide-react", "@radix-ui/react-icons"], serverActions: { // Job files bucket caps individual files at 30MB; allow batch uploads // (multipart overhead + ~16 files of 30MB worst case). bodySizeLimit: "500mb", }, // Next 16 renamed `middlewareClientMaxBodySize` to `proxyClientMaxBodySize` // (middleware.ts → proxy.ts). Default 10MB gates every body that flows // through our auth proxy — without this override multipart uploads exceed // the cap and the parser dies with "Unexpected end of form". proxyClientMaxBodySize: "500mb", }, turbopack: {}, images: { remotePatterns: [ { protocol: "https", hostname: "ui.shadcn.com" }, { protocol: "https", hostname: "images.unsplash.com" }, ], formats: ["image/webp", "image/avif"], }, async headers() { return [ { source: "/(.*)", headers: [ { key: "X-Frame-Options", value: "DENY" }, { key: "X-Content-Type-Options", value: "nosniff" }, { key: "Referrer-Policy", value: "origin-when-cross-origin" }, ], }, ]; }, async redirects() { return [ { source: "/home", destination: "/dashboard", permanent: true }, ]; }, }; export default nextConfig;