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; raise overall body // limit to allow batch uploads. bodySizeLimit: "100mb", }, }, turbopack: {}, // Image optimization images: { remotePatterns: [ { protocol: 'https', hostname: 'ui.shadcn.com', }, { protocol: 'https', hostname: 'images.unsplash.com', }, ], formats: ['image/webp', 'image/avif'], }, // Headers for better security and performance 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', }, ], }, ]; }, // Redirects for better SEO async redirects() { return [ { source: '/home', destination: '/dashboard', permanent: true, }, ]; }, }; // Next 16 caps middleware-passed request bodies at 10MB by default. Our auth // middleware sees every request including job-file uploads — without this // override, multipart uploads larger than 10MB return "Unexpected end of // form". The key isn't in NextConfig's TS types yet (Next 16.1). (nextConfig as NextConfig & { middlewareClientMaxBodySize?: string }).middlewareClientMaxBodySize = "100mb"; export default nextConfig;