diff --git a/src/electron-main.ts b/src/electron-main.ts index ab58baa..0bea529 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -4,10 +4,11 @@ */ import { app, BrowserWindow, ipcMain, globalShortcut, clipboard } from 'electron'; -import { join } from 'path'; +import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; -const __dirname = fileURLToPath(new URL('.', import.meta.url)); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); let mainWindow: BrowserWindow | null = null; diff --git a/tsconfig.json b/tsconfig.json index aca2703..c8ecc09 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,5 +21,5 @@ "allowSyntheticDefaultImports": true }, "include": ["src/**/*.ts"], - "exclude": ["node_modules", "dist", "test", "src/electron-main.ts", "src/preload.ts"] + "exclude": ["node_modules", "dist", "test"] }