diff --git a/packages/nuxt/src/pages/utils.ts b/packages/nuxt/src/pages/utils.ts index 7f078eed28..327521a10d 100644 --- a/packages/nuxt/src/pages/utils.ts +++ b/packages/nuxt/src/pages/utils.ts @@ -68,7 +68,10 @@ export async function resolvePagesRoutes (nuxt = useNuxt()): Promise return pages } - const augmentCtx = { extraExtractionKeys: nuxt.options.experimental.extraPageMetaExtractionKeys } + const augmentCtx = { + extraExtractionKeys: nuxt.options.experimental.extraPageMetaExtractionKeys, + fullyResolvedPaths: new Set(scannedFiles.map(file => file.absolutePath)), + } if (shouldAugment === 'after-resolve') { await nuxt.callHook('pages:extend', pages) await augmentPages(pages, nuxt.vfs, augmentCtx) @@ -154,6 +157,7 @@ export function generateRoutesFromFiles (files: ScannedFile[], options: Generate } interface AugmentPagesContext { + fullyResolvedPaths?: Set pagesToSkip?: Set augmentedPages?: Set extraExtractionKeys?: string[] @@ -163,7 +167,9 @@ export async function augmentPages (routes: NuxtPage[], vfs: Record