fix(nuxt): don't incl overridden layer pages as nested children (#23238)

This commit is contained in:
Daniel Roe 2023-09-16 09:53:37 +01:00 committed by GitHub
parent bc8a1fa614
commit 137c0b6054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -52,7 +52,7 @@ export async function resolvePagesRoutes (): Promise<NuxtPage[]> {
}
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')
}

View File

@ -1,3 +1,8 @@
<template>
<div>This page should be overriden by bar</div>
</template>
<script setup lang="ts">
import invalidImport from '234897f'
console.log(invalidImport)
</script>