Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions pages/docs/[module].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,17 @@ export async function getStaticPaths() {
const { listModuleNames } = await import('../../data/utils')
const modulesNames = await listModuleNames()

const paths = modulesNames.map((name) => ({
params: { module: name },
}))
// Next.js would write the static props snapshot for a "modules/boost" dynamic route to "boost.json"
// but there is also a BCR module of that name. So skip build-time pre-rendering of the boost module.
const paths = modulesNames
.filter((name) => name != 'boost')
.map((name) => ({
params: { module: name },
}))

return {
paths,
fallback: false,
fallback: 'blocking',
}
}

Expand Down
13 changes: 8 additions & 5 deletions pages/modules/[module].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -676,14 +676,17 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
export async function getStaticPaths() {
const modulesNames = await listModuleNames()

const paths = modulesNames.map((name) => ({
params: { module: name },
}))
// Next.js would write the static props snapshot for a "modules/boost" dynamic route to "boost.json"
// but there is also a BCR module of that name. So skip build-time pre-rendering of the boost module.
const paths = modulesNames
.filter((name) => name != 'boost')
.map((name) => ({
params: { module: name },
}))

return {
paths,
// TODO: fallback true?
fallback: false,
fallback: 'blocking',
}
}

Expand Down