Skip to content

Commit

Permalink
fix: properly resolve dist dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 11, 2022
1 parent a402ace commit d7c65e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dirs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { fileURLToPath } from 'url'
import { dirname, resolve } from 'pathe'

let distDir = dirname(fileURLToPath(import.meta.url))
if (distDir.endsWith('chunks')) {
if (/\/[chunks|shared]$/.test(distDir)) {
distDir = dirname(distDir)
}
export const pkgDir = resolve(distDir, distDir.endsWith('/chunks') ? '../..' : '..')
export const pkgDir = resolve(distDir, '..')
export const runtimeDir = resolve(distDir, 'runtime')

0 comments on commit d7c65e6

Please sign in to comment.