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 21, 2024
1 parent 7d5708d commit f06b279
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { app, BrowserWindow, shell, ipcMain } from 'electron'
import { createRequire } from 'node:module'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import os from 'node:os'

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 f06b279

Please sign in to comment.