generateStaticParams() doesn't pre-render my pages
Answered
>. Regex posted this in #help-forum
>. RegexOP
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.
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 params4 Replies
@>. Regex 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.
I think you should return an array of
{ lang: string, slug: string[]} instead of object of paramsAnswer
const paths :PageParams["params"][] = []>. RegexOP
🤦ðŸ»â€â™‚ï¸ indeed, that was that 😅 Thanks for your help @Ray !