GenerateStaticParams + DynamicParams=false not Working in Next13
I am using
generateStaticParams
:
I want to only generate static pages for this route, and return a 404
when a user tries to visit something that does not exist at build time. So I am opting out of dynamic like so:
However, when I build this, this gives me a 404
for all my static routes. It works when I leave things dynamic and also in development, but not when I build the project.
Next.JS also tells me that it recgonised the page and generated a static version, so it looks like it DID work:
However: when I visit it in production, it return a 404
. Am I misunderstanding how this is supposed to be used?0 Replies