diff --git a/src/app/alternatives/[slug]/page.tsx b/src/app/alternatives/[slug]/page.tsx index f852d823..4c81e6ee 100644 --- a/src/app/alternatives/[slug]/page.tsx +++ b/src/app/alternatives/[slug]/page.tsx @@ -11,7 +11,7 @@ import { computeFieldStats } from "@/lib/stats"; import { capDescription } from "@/lib/seo-text"; import { SectionLabel, SummaryStat } from "@/components/summary-stat"; import { SITE } from "@/data/site"; -import { loadAlternative, loadAlternativeSlugs } from "@/lib/alternatives"; +import { loadAlternative } from "@/lib/alternatives"; import { safeJsonLd } from "@/lib/jsonld"; import { ProviderLogo } from "@/components/provider-logo"; import { ProviderTypeBadge } from "@/components/provider-type-badge"; @@ -21,9 +21,11 @@ export const revalidate = 60; type Params = { slug: string }; -export async function generateStaticParams() { - const slugs = await loadAlternativeSlugs(); - return slugs.map((slug) => ({ slug })); +// Rendered ON DEMAND (first request, then ISR-cached), same reasoning as +// /products/[slug]: prerendering these at build multiplies the full +// multi-bench Prom load per build worker and blew the page budget. +export async function generateStaticParams(): Promise<{ slug: string }[]> { + return []; } export async function generateMetadata({ diff --git a/src/app/products/[slug]/page.tsx b/src/app/products/[slug]/page.tsx index e9977e01..22346a5b 100644 --- a/src/app/products/[slug]/page.tsx +++ b/src/app/products/[slug]/page.tsx @@ -2,7 +2,7 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; import Link from "next/link"; import { ArrowLeft, ArrowUpRight } from "lucide-react"; -import { getProvider, getProviderSlugs } from "@/lib/providers"; +import { getProvider } from "@/lib/providers"; import { ProviderLogo } from "@/components/provider-logo"; import { CATEGORY_COLOR } from "@/lib/category-colors"; import { fmtUnit } from "@/lib/format"; @@ -18,9 +18,15 @@ export const revalidate = 60; type Params = { slug: string }; -export async function generateStaticParams() { - const slugs = await getProviderSlugs(); - return slugs.map((slug) => ({ slug })); +// Rendered ON DEMAND (first request, then ISR-cached). Prerendering the +// ~200 product pages at build forced every build worker through the full +// multi-bench Prom load and blew the per-page budget once the HL bench +// grew past 60 providers (observed 2026-06-11: builds failing on +// /products/ after 240s). The empty params list keeps the route +// statically optimized; dynamicParams (default true) renders each slug +// on first hit, and the OG image route follows the same behavior. +export async function generateStaticParams(): Promise<{ slug: string }[]> { + return []; } export async function generateMetadata({