From 636e6c38ea74dec428c737ce775104fd2f5dded9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Mon, 1 Nov 2021 19:30:39 +0800 Subject: [PATCH] feat: loadFile --- main/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/index.ts b/main/index.ts index 4e3c321..30b61e4 100644 --- a/main/index.ts +++ b/main/index.ts @@ -1,3 +1,4 @@ +import { join } from 'path' import { app, BrowserWindow } from 'electron' const WINDOWS: Record = { @@ -11,7 +12,7 @@ function mainWin() { }) if (app.isPackaged) { - WINDOWS.main.loadFile('') + WINDOWS.main.loadFile(join(__dirname, '../react-ts/index.html')) } else { WINDOWS.main.loadURL(`http://127.0.0.1:${process.env.PORT}`) }