Only execute getStaticPaths
once in dev mode possible?
#20076
Unanswered
marceloverdijk
asked this question in
Help
Replies: 2 comments 1 reply
-
In dev (via |
Beta Was this translation helpful? Give feedback.
1 reply
-
I could cache the results from (would be great if something like that could be done out of the box) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Next.js to build a SSG website.
In development mode I run the site with
npm run dev
but it seems the index pages rerun thegetStaticPaths
on every page visit.So e.g. going to the Employee list page
getStaticPaths
is executed which is expected.Then when going to a Employee detail page and back to the Employee list page
getStaticPaths
is called again.As the
getStaticPaths
takes a couple of seconds it gives a very sluggish developer experience...Is there a way to avoid
getStaticPaths
to be executed every timeBeta Was this translation helpful? Give feedback.
All reactions