fix(desktop): use CJS for preload script to fix sandbox loading error

This commit is contained in:
2026-02-09 02:17:57 +08:00
parent 18ce05854a
commit 10c2d61523
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
"name": "@furtherverse/desktop", "name": "@furtherverse/desktop",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"type": "module",
"main": "out/main/index.js", "main": "out/main/index.js",
"scripts": { "scripts": {
"build": "electron-vite build", "build": "electron-vite build",

View File

@@ -113,7 +113,7 @@ const createWindow = async () => {
height: 800, height: 800,
show: false, show: false,
webPreferences: { webPreferences: {
preload: join(__dirname, '../preload/index.mjs'), preload: join(__dirname, '../preload/index.js'),
sandbox: true, sandbox: true,
}, },
}) })