Open changzi opened 4 years ago
在主进程再打开一个窗口 let win = new BrowserWindow({ width: 1400, height: 800, resizable: false, autoHideMenuBar: true, webPreferences: { webSecurity: false } }) win.on('closed', () => { win = null })
// Or load a local HTML file
const initWinURL = process.env.NODE_ENV === 'development'
? http://localhost:9080#showInit
: file://${__dirname}/init.html#showInit
win.loadURL(initWinURL)
在主进程再打开一个窗口 let win = new BrowserWindow({ width: 1400, height: 800, resizable: false, autoHideMenuBar: true, webPreferences: { webSecurity: false } }) win.on('closed', () => { win = null })
// Or load a local HTML file const initWinURL = process.env.NODE_ENV === 'development' ?
http://localhost:9080#showInit
:file://${__dirname}/init.html#showInit
win.loadURL(initWinURL)
Thank you for your reply. If this html file is built with webpack, how do I set up webpack?
我有一个主窗口,根据业务需要,需要新开启另外一个新窗口,但在打包后,新窗口打开空白?请问怎么解决?