Skip to content

Commit 1af81ed

Browse files
committed
fix(schema): use v3 folder structure if app.vue exists in rootDir
1 parent 8958f7c commit 1af81ed

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/schema/src/config/common.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ export default defineUntypedSchema({
105105

106106
const srcDir = resolve(rootDir, 'app')
107107
if (!existsSync(srcDir)) {
108+
for (const file of ['app.vue', 'App.vue']) {
109+
if (existsSync(resolve(rootDir, file))) {
110+
return rootDir
111+
}
112+
}
108113
const keys = ['assets', 'layouts', 'middleware', 'pages', 'plugins'] as const
109114
const dirs = await Promise.all(keys.map(key => get(`dir.${key}`) as Promise<string>))
110115
for (const dir of dirs) {

0 commit comments

Comments
 (0)