fix(schema): prefer src to rootDir aliases (#19937)

This commit is contained in:
Daniel Roe 2023-03-28 10:37:06 +02:00 committed by GitHub
parent ebf3ec398f
commit 45cedd85bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,10 +303,10 @@ export default defineUntypedSchema({
*/
alias: {
$resolve: async (val, get) => ({
'~~': await get('rootDir'),
'@@': await get('rootDir'),
'~': await get('srcDir'),
'@': await get('srcDir'),
'~~': await get('rootDir'),
'@@': await get('rootDir'),
[await get('dir.assets')]: join(await get('srcDir'), await get('dir.assets')),
[await get('dir.public')]: join(await get('srcDir'), await get('dir.public')),
...val