mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
fix(schema): use v3 folder structure if app.vue
exists in rootDir
This commit is contained in:
parent
8958f7ca70
commit
1af81ed0fb
@ -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<string>))
|
||||
for (const dir of dirs) {
|
||||
|
Loading…
Reference in New Issue
Block a user