feat: define globalThis.__dirname

This commit is contained in:
Leo Wang(草鞋没号) committed 2024-02-11 10:54:10 +08:00
1 parent 3d4395fb20
commit 031bb81f73
1 file changed
+2 -2
+2 -2
View File
@@ -4,8 +4,8 @@ import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { update } from './update'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
globalThis.__filename = fileURLToPath(import.meta.url)
globalThis.__dirname = dirname(__filename)
// The built directory structure
//