Skip to content

Commit 0dcdf39

Browse files
committed
chore: remove globalThis.__dirname
1 parent f48de08 commit 0dcdf39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

electron/main.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { app, BrowserWindow } from 'electron'
2+
import { createRequire } from 'node:module'
23
import { fileURLToPath } from 'node:url'
34
import path from 'node:path'
45

5-
globalThis.__filename = fileURLToPath(import.meta.url)
6-
globalThis.__dirname = path.dirname(__filename)
6+
const require = createRequire(import.meta.url)
7+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
78

89
// The built directory structure
910
//

0 commit comments

Comments
 (0)