Skip to content

Commit 10e7fa0

Browse files
Merge pull request #98 from DevLoversTeam/develop
Fix Netlify build by skipping product static params generation
2 parents 5d13b36 + 6cda6c0 commit 10e7fa0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • frontend/app/[locale]/shop/products/[slug]

frontend/app/[locale]/shop/products/[slug]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ import { formatMoney } from "@/lib/shop/currency";
1212
import { Link } from "@/i18n/routing";
1313
import { locales } from "@/i18n/config";
1414

15+
const shouldSkipStaticParams =
16+
process.env.NETLIFY === "true" ||
17+
process.env.SKIP_BUILD_STATIC_PARAMS === "true";
18+
1519
export async function generateStaticParams() {
20+
if (shouldSkipStaticParams) {
21+
return [];
22+
}
23+
1624
const all: { locale: string; slug: string }[] = [];
1725

1826
for (const locale of locales) {

0 commit comments

Comments
 (0)