Skip to content

Commit 53e97eb

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

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,15 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
676676
export async function getStaticPaths() {
677677
const modulesNames = await listModuleNames()
678678

679-
const paths = modulesNames.map((name) => ({
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.filter(name => name != "boost").map((name) => ({
680682
params: { module: name },
681683
}))
682684

683685
return {
684686
paths,
685-
// TODO: fallback true?
686-
fallback: false,
687+
fallback: 'blocking',
687688
}
688689
}
689690

0 commit comments

Comments
 (0)