generateStaticRoutes still results in API request
See original GitHub issueI am using the generateStaticRoutes
option with my deployment. After the build, I can see the static files were generated correctly in the output, however navigating to a pre-generated page on the client side still results in a hit to /api
on my CMS.
Maybe I’m misunderstanding what this feature does, but I would expect to get a payload.js
when requesting pages that have already been generated. Am I missing something or is this an error?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Nuxt generate is keeping my dynamic routes working
The docs say that dynamic routes do not work with this, but my app (/dist) still works on static server after generating, even...
Read more >generateStaticRoutes doesn't work for main index.vue ...
Hey, the feature "generateStaticRoutes": true does work pretty well ... for main index.vue – landingpage re-rendered on each request #669.
Read more >next-server.ts - vercel/next.js - Sourcegraph
render-result.ts ... send module will throw 412 with conditional GET request ... Resolves `API` request, in development builds on demand.
Read more >Vercel Builder for Nuxt.js - Morioh
This builder will run a given custom build step if you have added a vercel-build key under scripts in package.json . Deploying additional...
Read more >Confused about nextjs data fetching - Reddit
I've looked at the documentation a bit and am still pretty confused. I have a React app that fetches data from an API...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@danielroe Awesome news, that would truly be the best of both worlds. Thanks again.
@jonathanmelville Yes, the question is just when the generation happens. If you generate them at build time then the first user to access the pages gets them instantly. Otherwise the first user to access the page encounters a delay and subsequent users get them instantly.