You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make dynamic path page to be rendered(SSG) in build time only intentionally
Non-Goals
Background
Already discussed in #17772, there is a need for getStaticProps without getStaticPaths when we define getStaticProps which does not depend on the dynamic path parameter.
Since the page does not depend on parameter but renders same output for different dynamic path, developers may don't want getStaticPaths to run on runtime.
So I want nextjs to make dynamic path page to be rendered(SSG) in build time only intentionally if some option is specified.
Proposal
Defining getStaticPaths with some new option like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
Already discussed in #17772, there is a need for
getStaticProps
withoutgetStaticPaths
when we definegetStaticProps
which does not depend on the dynamic path parameter.Since the page does not depend on parameter but renders same output for different dynamic path, developers may don't want
getStaticPaths
to run on runtime.So I want nextjs to make dynamic path page to be rendered(SSG) in build time only intentionally if some option is specified.
Proposal
Defining
getStaticPaths
with some new option like:or
When one of those new option is specified, make
getStaticProps
to not run on runtime, but only in buildtime.Beta Was this translation helpful? Give feedback.
All reactions