From dc82ca15096f889433bddfe52f4ad39eb5cad1bb Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Sun, 25 Feb 2024 19:24:31 +0100 Subject: [PATCH] chore: reduce build times by making build of these routes on-demand --- app/[locale]/next-data/api-data/route.ts | 2 +- app/[locale]/next-data/blog-data/[category]/[page]/route.ts | 2 +- app/[locale]/next-data/page-data/route.ts | 2 +- app/[locale]/next-data/release-data/route.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/[locale]/next-data/api-data/route.ts b/app/[locale]/next-data/api-data/route.ts index 11d48967bbe0c..5392b97901ce1 100644 --- a/app/[locale]/next-data/api-data/route.ts +++ b/app/[locale]/next-data/api-data/route.ts @@ -55,7 +55,7 @@ export const dynamicParams = false; // Enforces that this route is used as static rendering // @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic -export const dynamic = 'force-static'; +export const dynamic = 'error'; // Ensures that this endpoint is invalidated and re-executed every X minutes // so that when new deployments happen, the data is refreshed diff --git a/app/[locale]/next-data/blog-data/[category]/[page]/route.ts b/app/[locale]/next-data/blog-data/[category]/[page]/route.ts index 71181cccef0f3..e00c2305a10c8 100644 --- a/app/[locale]/next-data/blog-data/[category]/[page]/route.ts +++ b/app/[locale]/next-data/blog-data/[category]/[page]/route.ts @@ -59,7 +59,7 @@ export const dynamicParams = false; // Enforces that this route is cached and static as much as possible // @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic -export const dynamic = 'force-static'; +export const dynamic = 'error'; // Ensures that this endpoint is invalidated and re-executed every X minutes // so that when new deployments happen, the data is refreshed diff --git a/app/[locale]/next-data/page-data/route.ts b/app/[locale]/next-data/page-data/route.ts index 34a715f5973de..b779e64569224 100644 --- a/app/[locale]/next-data/page-data/route.ts +++ b/app/[locale]/next-data/page-data/route.ts @@ -64,7 +64,7 @@ export const dynamicParams = false; // Enforces that this route is used as static rendering // @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic -export const dynamic = 'force-static'; +export const dynamic = 'error'; // Ensures that this endpoint is invalidated and re-executed every X minutes // so that when new deployments happen, the data is refreshed diff --git a/app/[locale]/next-data/release-data/route.ts b/app/[locale]/next-data/release-data/route.ts index b15402ccda8c9..a664ad9cf3ef6 100644 --- a/app/[locale]/next-data/release-data/route.ts +++ b/app/[locale]/next-data/release-data/route.ts @@ -24,7 +24,7 @@ export const dynamicParams = false; // Enforces that this route is used as static rendering // @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic -export const dynamic = 'force-static'; +export const dynamic = 'error'; // Ensures that this endpoint is invalidated and re-executed every X minutes // so that when new deployments happen, the data is refreshed