diff --git a/src/background.js b/src/background.js index 456706e8a20c0fbb7a2fd460be861d7e231c5fc6..505362314d87f0656179ce5f6d709f42f62385f0 100644 --- a/src/background.js +++ b/src/background.js @@ -14,9 +14,11 @@ protocol.registerSchemesAsPrivileged([ async function createWindow() { // Create the browser window. const win = new BrowserWindow({ + show: false, width: 800, height: 600, webPreferences: { + // eslint-disable-next-line no-undef preload: path.join(__static, 'preload.js'), // Use pluginOptions.nodeIntegration, leave this alone // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info @@ -34,6 +36,10 @@ async function createWindow() { // Load the index.html when not in development win.loadURL('app://./index.html') } + + win.once('ready-to-show', () => { + win.show() + }) } // Quit when all windows are closed.