Martin
Martin
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Martin on 10/17/2023 in #questions
NextJS Static Export
I am building a NextJS app that is going to be static. For that, in my articles path I have a dynamic route. Using generateStaticParams I call the backend to retrieve all articles so we know with what values the path param will be used. This seems to work great. However, what I now see when I run npm run build (with all, bun, npm and pnpm) is my page also does a call on the backend with the value [id] which is the folder name and thus dynanmic route segment. I do not expect that to happen. Why does that happen, and how can I mitigate that? I just feel dumb now.
18 replies