This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[✨] Pre-render at build time paths specified by onStaticGenerate
in Vercel adapter
#39
Labels
[STAGE-2] incomplete implementation
Remove this label when implementation is complete
[STAGE-2] not fully covered by tests yet
Remove this label when tests are verified to cover the implementation
[STAGE-2] unresolved discussions left
Remove this label when all critical discussions are resolved on the issue
[STAGE-3] docs changes not added yet
Remove this label when the necessary documentation for the feature / change is added
[STAGE-3] missing 2 reviews for RFC PRs
Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Is your feature request related to a problem?
Most routes in my project are static and thus can be pre-rendered at build time. But not all of them are, and so I cannot use the static adapter. This results in higher-than-otherwise TTFB. Many of my pages are intended to rank for long-tail (i.e, low traffic) keywords on search engines, and so rarely get more than 1 visit between builds and thus would not benefit much from just specifying cache controls.
Describe the solution you'd like
All paths specified by
onStaticGenerate
in every route are pre-rendered as part of the build when using the Vercel adapter. These paths are then served from cache in response to the first request for this path. Routes still respect cacheControl, e.g. will regenerate the route aftermax-age
time has elapsed.Describe alternatives you've considered
Static Adapter: does not allow for route regeneration, does not do SSR for paths not specified by
onStaticGenerate
Additional context
NextJS implements similar functionality:
(Note that the various fallback options described in these docs are not part of this feature request; I've provided this just as a reference for how another framework implements a similar feature)
The text was updated successfully, but these errors were encountered: