This repository was archived by the owner on Apr 15, 2021. It is now read-only.
This repository was archived by the owner on Apr 15, 2021. It is now read-only.
Static Pre-rendering types inconsistency #109
Open
Description
Hey!
I think I found an error in Static Prerendering docs.
There is an example of using an async function as a pre-render request function in docs:
module.exports = new Router().prerender(async () => {
const paths = await fetchCategoryPathsFromAPI()
return paths.map(path => ({ path }))
})
However, TS won't let me compile this code since:
The same goes for the Next.js example:
The only workaround I found is to make any request function async and use an array of them as an argument for prerender()
:
Is this intentional?
If so, I can create a PR to update docs for this page.
Metadata
Metadata
Assignees
Labels
No labels