diff --git a/packages/schema/src/config/common.ts b/packages/schema/src/config/common.ts index f2d1eb65a1..c4fd5640a0 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -105,6 +105,11 @@ export default defineUntypedSchema({ const srcDir = resolve(rootDir, 'app') if (!existsSync(srcDir)) { + for (const file of ['app.vue', 'App.vue']) { + if (existsSync(resolve(rootDir, file))) { + return rootDir + } + } const keys = ['assets', 'layouts', 'middleware', 'pages', 'plugins'] as const const dirs = await Promise.all(keys.map(key => get(`dir.${key}`) as Promise)) for (const dir of dirs) {