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 cc6951c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
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 cc6951c

Please sign in to comment.