refactor(nuxt): use pathe.join for layer lookup (#9540)

This commit is contained in:
Alexander Lichter 2022-12-06 12:30:14 +01:00 committed by GitHub
parent 57d1b6d907
commit d0c0cd7ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,10 @@ export async function resolveApp (nuxt: Nuxt, app: NuxtApp) {
// Resolve main (app.vue)
if (!app.mainComponent) {
app.mainComponent = await findPath(
nuxt.options._layers.flatMap(layer => [`${layer.config.srcDir}/App`, `${layer.config.srcDir}/app`])
nuxt.options._layers.flatMap(layer => [
join(layer.config.srcDir, 'App'),
join(layer.config.srcDir, 'app')
])
)
}
if (!app.mainComponent) {