Skip to content

Commit 79e7540

Browse files
Michael CyrollMichael Cyroll
authored andcommitted
fix: add ESM-compatible __dirname for Electron main process
1 parent 458eb26 commit 79e7540

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextcloud-deck-electron",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"description": "Standalone macOS app for Nextcloud Deck",
55
"type": "module",
66
"main": "dist/main/main.js",

src/main/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { app, BrowserWindow, ipcMain, Menu, type MenuItemConstructorOptions } from 'electron';
22
import path from 'path';
3+
import { fileURLToPath } from 'url';
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = path.dirname(__filename);
37

48
// Electron Store (ESM-kompatibel über dynamischen Import)
59
type Preferences = {

0 commit comments

Comments
 (0)