Nuxt/packages/nuxt/src/dirs.ts

9 lines
342 B
TypeScript
Raw Normal View History

import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'pathe'
let _distDir = dirname(fileURLToPath(import.meta.url))
2022-08-11 10:40:11 +00:00
if (_distDir.match(/(chunks|shared)$/)) { _distDir = dirname(_distDir) }
export const distDir = _distDir
export const pkgDir = resolve(distDir, '..')
export const runtimeDir = resolve(distDir, 'runtime')