fix: 修复 preload 路径 (.mjs 而不是 .js)
- electron-vite v3 输出 .mjs 文件 - 更新 preload 路径为 index.mjs - 这是 window.electronAPI undefined 的根本原因
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ function createWindow(): void {
|
||||
title: 'JRedisDesktop',
|
||||
backgroundColor: nativeTheme.shouldUseDarkColors ? '#0f0f1a' : '#f8fafc',
|
||||
webPreferences: {
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
preload: join(__dirname, '../preload/index.mjs'),
|
||||
contextIsolation: true,
|
||||
nodeIntegration: false,
|
||||
sandbox: false,
|
||||
|
||||
Reference in New Issue
Block a user