feat: support loading
This commit is contained in:
1 parent
ad9e8a4937
commit
62531ae987
5 files changed
+104
-2
No files matched your search
@@ -9,12 +9,16 @@ const WINDOWS: Record<string, BrowserWindow | null> = {
|
||||
function mainWin() {
|
||||
WINDOWS.main = new BrowserWindow({
|
||||
title: 'Main window',
|
||||
webPreferences: {
|
||||
preload: join(__dirname, '../preload/index.main')
|
||||
},
|
||||
})
|
||||
|
||||
if (app.isPackaged) {
|
||||
WINDOWS.main.loadFile(join(__dirname, '../react-ts/index.html'))
|
||||
} else {
|
||||
WINDOWS.main.loadURL(`http://127.0.0.1:${process.env.PORT}`)
|
||||
WINDOWS.main.maximize()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user