From 0816fafc02f1e0ba1ffd28afba10bf48903a40fc Mon Sep 17 00:00:00 2001 From: H3CoF6 Date: Thu, 19 Mar 2026 00:26:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(linux):=20=E4=BF=AE=E5=A4=8Dlinux=E4=B8=AD?= =?UTF-8?q?=EF=BC=8Crequire=E7=9A=84=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/electron/main.ts b/electron/main.ts index b32882c..973c9a1 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -95,8 +95,13 @@ let keyService: any if (process.platform === 'darwin') { keyService = new KeyServiceMac() } else if (process.platform === 'linux') { - const { KeyServiceLinux } = require('./services/keyServiceLinux') - keyService = new KeyServiceLinux() + // const { KeyServiceLinux } = require('./services/keyServiceLinux') + // keyService = new KeyServiceLinux() + + import('./services/keyServiceLinux').then(({ KeyServiceLinux }) => { + keyService = new KeyServiceLinux(); + }); + } else { keyService = new KeyService() }