From 5a042cd69b8f1461d309edf4b59cd1690493dcaf Mon Sep 17 00:00:00 2001 From: Kevin Marrec Date: Fri, 29 Jul 2022 13:12:50 +0200 Subject: [PATCH] feat(nuxt): extends support for `app.vue` (#6228) --- packages/nuxt/src/core/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/core/app.ts b/packages/nuxt/src/core/app.ts index 50524ca24a..fbb820e060 100644 --- a/packages/nuxt/src/core/app.ts +++ b/packages/nuxt/src/core/app.ts @@ -57,7 +57,9 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp) { export async function resolveApp (nuxt: Nuxt, app: NuxtApp) { // Resolve main (app.vue) if (!app.mainComponent) { - app.mainComponent = await findPath(['~/App', '~/app']) + app.mainComponent = await findPath( + nuxt.options._layers.flatMap(layer => [`${layer.config.srcDir}/App`, `${layer.config.srcDir}/app`]) + ) } if (!app.mainComponent) { app.mainComponent = tryResolveModule('@nuxt/ui-templates/templates/welcome.vue')