From 9f7dc36ce4d391054d091a2de96eb5e26924e23d Mon Sep 17 00:00:00 2001 From: chenqiang Date: Tue, 9 Sep 2025 05:57:43 +0800 Subject: [PATCH] background.js --- vue.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vue.config.js b/vue.config.js index 78ea03d..88d2404 100644 --- a/vue.config.js +++ b/vue.config.js @@ -78,6 +78,10 @@ module.exports = { // 在electron-builder 22.9.1中,压缩配置应该在build选项中设置 builderOptions: { compression: "store", // 等同于--no-compress,不压缩应用 + // 添加这行配置,强制设置打包后package.json的main字段 + extraMetadata: { + main: "background.js" + } }, }, },