pelagia-portal/App/next.config.ts
Hardik d7b455ab7d
All checks were successful
PR checks / checks (pull_request) Successful in 44s
PR checks / integration (pull_request) Successful in 31s
refactor(routes): move /inventory/{items,vendors} → /catalogue/{items,vendors}
Renames the product-catalogue pages (items + vendors, incl. their [id] detail
pages) out of /inventory into /catalogue. /inventory/cart is unchanged. All
internal links, redirects, revalidatePath calls, sidebar nav, and tests are
updated; next.config redirects keep old /inventory/{items,vendors}[/...] URLs
working (permanent) so existing bookmarks don't 404.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 05:04:29 +05:30

32 lines
874 B
TypeScript

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;