Open skulls-dot-codes opened 2 years ago
Hmm, this is an interesting issue. I added the await because it fixed some issues with devtools, but I think using .then
would work for that. Try using this code and let me know if it fixes your issue:
win.loadURL(process.env.WEBPACK_DEV_SERVER_URL).then(() => {
if (!process.env.IS_TEST) win.webContents.openDevTools()
})
Old issue I know, sorry, but just wanted to +1 and say I also had this issue and was scratching my head as to why the events weren't firing.
Removed async
/ await
from my window creation functions, used .then()
and they started working..!
Describe the bug The template for
background.js
usesawait win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
to load the vue server in development. For some reason this prevents thedom-ready
,did-finish-load
,ready-to-show
events in the main process from firing reliably and also the mounted event in vue.To Reproduce Create a new project and create listeners for any of the events above. They most likely will not fire. Removing
await
fromwin.loadURL
will allow these events to fire.Expected behavior The development server or build process should not interfere with the events.
Environment (please complete the following information): Custom
vue.config.js
to enable node integration:terminal output from running
vue info
: