Skip to content

Commit db9a007

Browse files
committed
fix: skip prerendering of 'boost' module
it conflicts with the boost.json module
1 parent fcc2748 commit db9a007

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

MODULE.bazel.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/modules/[module].tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,17 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
676676
export async function getStaticPaths() {
677677
const modulesNames = await listModuleNames()
678678

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

683687
return {
684688
paths,
685-
// TODO: fallback true?
686-
fallback: false,
689+
fallback: 'blocking',
687690
}
688691
}
689692

0 commit comments

Comments
 (0)