Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dir.app
1 parent dea0b86 commit 0c73cb7Copy full SHA for 0c73cb7
packages/schema/src/config/common.ts
@@ -301,7 +301,8 @@ export default defineUntypedSchema({
301
$resolve: async (val: string | undefined, get) => {
302
const isV4 = (await get('future') as Record<string, unknown>).compatibilityVersion === 4
303
if (isV4) {
304
- return resolve(await get('srcDir') as string, val || '.')
+ const [srcDir, rootDir] = await Promise.all([get('srcDir') as Promise<string>, get('rootDir') as Promise<string>])
305
+ return resolve(await get('srcDir') as string, val || (srcDir === rootDir ? 'app' : '.'))
306
}
307
return val || 'app'
308
},
0 commit comments