Nuxt/packages/vite/src/dirs.ts
2022-08-11 12:40:11 +02:00

8 lines
288 B
TypeScript

import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'pathe'
let _distDir = dirname(fileURLToPath(import.meta.url))
if (_distDir.match(/(chunks|shared)$/)) { _distDir = dirname(_distDir) }
export const distDir = _distDir
export const pkgDir = resolve(distDir, '..')