import type { NextConfig } from "next"; const isDev = process.env.NODE_ENV === "development"; const nextConfig: NextConfig = { experimental: { serverActions: { bodySizeLimit: "10mb", }, }, images: { remotePatterns: [ { protocol: "https", hostname: "*.r2.cloudflarestorage.com", }, ...(isDev ? [{ protocol: "http" as const, hostname: "localhost" }] : []), ], }, // The product catalogue moved from /inventory/{items,vendors} to // /catalogue/{items,vendors}; keep old links (bookmarks, emails) working. async redirects() { return [ { source: "/inventory/items/:path*", destination: "/catalogue/items/:path*", permanent: true }, { source: "/inventory/vendors/:path*", destination: "/catalogue/vendors/:path*", permanent: true }, ]; }, }; export default nextConfig;