In NextJS there is a function getStaticPaths
that tells NextJS which routes are actually available when doing an export. A typical example is a blog that has posts available at /post/[id]
. Let's say there are two posts with the ID's 1
and 2
. In this case, getStaticPaths
would determine and return this information so that NextJS knows, it has to render a site for /posts/1
and /posts/2
when next export
is executed.
I'm wondering what's the equivalent for this in Sapper. I know that there is the preload
function, however, as far as I understand this should be used to fetch the actual post data and does not determine which dynamic routes actually exist at the time of the export.