From 137c0b60547e73a4cc54d74a8ca7a9d5e227b1fc Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 16 Sep 2023 09:53:37 +0100 Subject: [PATCH] fix(nuxt): don't incl overridden layer pages as nested children (#23238) --- packages/nuxt/src/pages/utils.ts | 2 +- .../basic/extends/node_modules/foo/pages/override.vue | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/utils.ts b/packages/nuxt/src/pages/utils.ts index d07233850e..ef207aa671 100644 --- a/packages/nuxt/src/pages/utils.ts +++ b/packages/nuxt/src/pages/utils.ts @@ -52,7 +52,7 @@ export async function resolvePagesRoutes (): Promise { } scannedFiles.sort((a, b) => a.relativePath.localeCompare(b.relativePath)) - const allRoutes = await generateRoutesFromFiles(scannedFiles, nuxt.options.experimental.typedPages, nuxt.vfs) + const allRoutes = await generateRoutesFromFiles(uniqueBy(scannedFiles, 'relativePath'), nuxt.options.experimental.typedPages, nuxt.vfs) return uniqueBy(allRoutes, 'path') } diff --git a/test/fixtures/basic/extends/node_modules/foo/pages/override.vue b/test/fixtures/basic/extends/node_modules/foo/pages/override.vue index 81a97ed0f2..5d47effd7f 100644 --- a/test/fixtures/basic/extends/node_modules/foo/pages/override.vue +++ b/test/fixtures/basic/extends/node_modules/foo/pages/override.vue @@ -1,3 +1,8 @@ + +