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 @@ + +