Menu

1 / 2

Five URLs our test suite demands we never publish, and the two ways a published page can vanish with the build still green

DEV Community: typescript·Daniel Pertu·about 23 hours ago
#usnZICEQ
#devtotypescript#devto#dev#gluten#word
Reading 0:00
15s threshold

Munchable publishes 461 question pages: one per ingredient and condition we have an answer for, each at the site root, each statically generated at build time from one array. The index groups them by condition.

They are generated, which is the nice part, and they are generated, which is the problem. Nothing in that pipeline can fail when a page stops existing.

Why a missing page is silent

The route is a dynamic segment with dynamicParams = false and dynamic = 'error' , so the only URLs that exist are the ones generateStaticParams returns. If an entry drops out of the source array, here is the complete list of things that happen:

generateStaticParams returns one fewer param

the sitemap contains one fewer URL

the index page renders one fewer link, because it is built from the same array

the build succeeds

No type error. No failed render. Not even a broken internal link, because every link to the page came from the list that lost it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.