Skip to content

Commit 1991c86

Browse files
committed
Merge branch 'main' of github.com:caoxiemeihao/electron-vue-vite into main
2 parents 5c841f5 + dfa7f85 commit 1991c86

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ dist-ssr
2323

2424
release
2525
.vscode/.debug.env
26+
package-lock.json
27+
pnpm-lock.yaml
28+
yarn.lock
2629
dist-electron

electron/main/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ ipcMain.handle('open-win', (event, arg) => {
101101
const childWindow = new BrowserWindow({
102102
webPreferences: {
103103
preload,
104+
nodeIntegration: true,
105+
contextIsolation: false,
104106
},
105107
})
106108

107109
if (app.isPackaged) {
108110
childWindow.loadFile(indexHtml, { hash: arg })
109111
} else {
110-
childWindow.loadURL(`${url}/#${arg}`)
112+
childWindow.loadURL(`${url}#${arg}`)
111113
// childWindow.webContents.openDevTools({ mode: "undocked", activate: true })
112114
}
113115
})

0 commit comments

Comments
 (0)