Skip to content

Commit

Permalink
chore: remove globalThis.__dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxiemeihao committed Apr 20, 2024
1 parent f48de08 commit 0dcdf39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { app, BrowserWindow } from 'electron'
import { createRequire } from 'node:module'
import { fileURLToPath } from 'node:url'
import path from 'node:path'

globalThis.__filename = fileURLToPath(import.meta.url)
globalThis.__dirname = path.dirname(__filename)
const require = createRequire(import.meta.url)
const __dirname = path.dirname(fileURLToPath(import.meta.url))

// The built directory structure
//
Expand Down

0 comments on commit 0dcdf39

Please sign in to comment.