From 3f4145e8008e79a193ad27a40b865e0a7132e9e2 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 5 Jun 2026 15:36:45 +0000 Subject: [PATCH] fix(sitemap): render at request time to avoid build-time DB dependency --- src/app/sitemap.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index c6ee5eb..a9e403c 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -1,6 +1,10 @@ import { MetadataRoute } from "next"; import { getActiveStopsForSitemap } from "@/actions/stops"; +// Sitemap calls a server action that needs the database — render at request time +// rather than build time so the build doesn't require PostgREST to be up. +export const dynamic = "force-dynamic"; + const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://yourdomain.com"; export default async function sitemap(): Promise {