fix(schema): do not use full path assets/public aliases

This commit is contained in:
Daniel Roe 2024-06-20 23:26:06 +01:00
parent 2475ee81cc
commit ae12d72a40
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -1,7 +1,7 @@
import { existsSync } from 'node:fs' import { existsSync } from 'node:fs'
import { readdir } from 'node:fs/promises' import { readdir } from 'node:fs/promises'
import { defineUntypedSchema } from 'untyped' import { defineUntypedSchema } from 'untyped'
import { join, relative, resolve } from 'pathe' import { basename, join, relative, resolve } from 'pathe'
import { isDebug, isDevelopment, isTest } from 'std-env' import { isDebug, isDevelopment, isTest } from 'std-env'
import { defu } from 'defu' import { defu } from 'defu'
import { findWorkspaceDir } from 'pkg-types' import { findWorkspaceDir } from 'pkg-types'
@ -420,8 +420,8 @@ export default defineUntypedSchema({
'@': srcDir, '@': srcDir,
'~~': rootDir, '~~': rootDir,
'@@': rootDir, '@@': rootDir,
[assetsDir]: join(srcDir, assetsDir), [basename(assetsDir)]: join(srcDir, assetsDir),
[publicDir]: join(srcDir, publicDir), [basename(publicDir)]: join(srcDir, publicDir),
...val, ...val,
} }
}, },