Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/app/alternatives/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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({
Expand Down
14 changes: 10 additions & 4 deletions src/app/products/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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/<slug> 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({
Expand Down
Loading