feat: define globalThis.__dirname

This commit is contained in:
Leo Wang(草鞋没号) 2024-02-11 10:53:28 +08:00
parent 85ed267c48
commit af8aa6cf7c

View File

@ -3,8 +3,8 @@ import { release } from 'node:os'
import { join, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
globalThis.__filename = fileURLToPath(import.meta.url)
globalThis.__dirname = dirname(__filename)
// The built directory structure
//