Using getStaticProps disables exportPathMap is this intentional? #12524
Unanswered
thomaschaaf
asked this question in
Help
Replies: 1 comment 3 replies
-
I think you can achieve what you're referring to with catch-all routes already: https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes and using getStaticPaths there. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are currently using an
exportPathMap
which looks roughly like this:In the /content page we are using getInitialProps to fetch the correct information depending on the query parameter. Now we wanted to migrate to getStaticsProps. With getStaticPaths we are not able to create that without creating a lot of "empty files". Sadly using getStaticProps overwrites the exportPathMap: https://github.com/zeit/next.js/blob/canary/packages/next/build/index.ts#L734
I was wondering about the future of
exportPathMap
will it be removed soon? Or would it be worth creating a PR to get both working at the same time? Is there maybe already an initiative to do that?Beta Was this translation helpful? Give feedback.
All reactions