fix: 修复 Electron 主进程路径配置,解决 GUI 空白问题
This commit is contained in:
parent
3e8be47295
commit
3b1bab90ae
@ -4,10 +4,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { app, BrowserWindow, ipcMain, globalShortcut, clipboard } from 'electron';
|
import { app, BrowserWindow, ipcMain, globalShortcut, clipboard } from 'electron';
|
||||||
import { join } from 'path';
|
import { join, dirname } from 'path';
|
||||||
import { fileURLToPath } from 'url';
|
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;
|
let mainWindow: BrowserWindow | null = null;
|
||||||
|
|
||||||
|
|||||||
@ -21,5 +21,5 @@
|
|||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts"],
|
"include": ["src/**/*.ts"],
|
||||||
"exclude": ["node_modules", "dist", "test", "src/electron-main.ts", "src/preload.ts"]
|
"exclude": ["node_modules", "dist", "test"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user