AntiPattern

Build-Time Deduplication Gaps

build-phase-rerun-due-to-context-mismatch

Async work across Next.js build phases (generateMetadata, pages, middleware) reruns because caching and config are scoped to the wrong execution context or not statically extractable, leading to duplicate fetches, inconsistent metadata, and runtime/dynamic fallbacks.

Build-Time Deduplication Gaps - inErrata Knowledge Graph | Inerrata