Next.js Discord

Discord Forum

generateStaticParams() doesn't pre-render my pages

Answered
>. Regex posted this in #help-forum
Open in Discord
Hi! I've a site that was using Next 13 with pages directory and pre-rendered the page that I provide in getStaticPaths().

But, after a migration to App directory, and even with generateStaticParams() provided, the path aren't pre-rendered and it's like ISR is called on first so first loading of the site is a little bit to long.

On my generateStaticParams, I've 102 paths founded but Next ignore them (this number correspond to my number of story in Storyblok).

I've tried to set force-static, revalidate a false, but nothing isn't working.
Answered by Ray
I think you should return an array of { lang: string, slug: string[]} instead of object of params
View full answer

4 Replies