Skip to content

Commit

Permalink
fix(schema): support absolute/relative paths for assetsDir
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 21, 2024
1 parent c0ec90d commit 8aefb55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/schema/src/config/common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { existsSync } from 'node:fs'
import { readdir } from 'node:fs/promises'
import { defineUntypedSchema } from 'untyped'
import { basename, join, relative, resolve } from 'pathe'
import { basename, relative, resolve } from 'pathe'
import { isDebug, isDevelopment, isTest } from 'std-env'
import { defu } from 'defu'
import { findWorkspaceDir } from 'pkg-types'
Expand Down Expand Up @@ -422,7 +422,7 @@ export default defineUntypedSchema({
'@': srcDir,
'~~': rootDir,
'@@': rootDir,
[basename(assetsDir)]: join(srcDir, assetsDir),
[basename(assetsDir)]: resolve(srcDir, assetsDir),
[basename(publicDir)]: resolve(srcDir, publicDir),
...val,
}
Expand Down

0 comments on commit 8aefb55

Please sign in to comment.