From d07d86e8598c7495d7aa7a769f77b7a21acf1fe5 Mon Sep 17 00:00:00 2001 From: leejooy96 Date: Thu, 20 Mar 2025 10:44:30 +0900 Subject: [PATCH] refactor: ignore install extension when failed to install --- src/main/index.dev.ts | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/index.dev.ts b/src/main/index.dev.ts index f3ac23a..7516b03 100644 --- a/src/main/index.dev.ts +++ b/src/main/index.dev.ts @@ -1,10 +1,22 @@ // Warning: This file is only used in the development environment // and is removed at build time. // Do not edit the file unless necessary. -import { installExtension, VUEJS_DEVTOOLS } from 'electron-extension-installer' +import { installExtension } from 'electron-extension-installer' +import { app } from 'electron' -installExtension(VUEJS_DEVTOOLS, { - loadExtensionOptions: { - allowFileAccess: true - } -}) +const vue3DevTools = { + id: 'nhdogjmejiglipccpnnnanhbledajbpd', + version: '7.7.0' +} + +try { + app.on('ready', async () => { + await installExtension(vue3DevTools, { + loadExtensionOptions: { + allowFileAccess: true + } + }) + }) +} catch { + // Do nothing +}