Skip to content

Commit

Permalink
feat: define globalThis.__dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxiemeihao committed Feb 11, 2024
1 parent 85ed267 commit af8aa6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { release } from 'node:os'
import { join, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

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

// The built directory structure
//
Expand Down

0 comments on commit af8aa6c

Please sign in to comment.