exam11/vue.config.js
2025-09-09 22:27:03 +08:00

83 lines
1.9 KiB
JavaScript

module.exports = {
// 添加应用标题配置
chainWebpack: (config) => {
config.plugin("html").tap((args) => {
args[0].title = "统计技能考试系统";
return args;
});
},
// 输出目录
outputDir: 'dist_electron',
pluginOptions: {
electronBuilder: {
mainProcessFile: 'background/main.js',
builderOptions: {
// 应用基本信息
appId: 'com.example.exam11',
productName: '统计技能考试系统',
// 压缩设置
compression: "store",
// 入口文件配置
extraMetadata: {
main: "background.js"
},
// Windows构建配置
win: {
// 架构设置
target: [
{
target: "portable",
arch: ["ia32", "x64"],
},
],
// 图标设置
icon: "public/favicon.ico",
// 明确禁用签名的多种配置
sign: false,
signingHashAlgorithms: [],
certificateFile: null,
certificatePassword: null,
// 额外资源配置
extraResources: [
{
from: "background",
to: "background",
filter: ["**/*"],
},
{
from: "data",
to: "data",
filter: ["**/*"], // 确保包含data目录下的所有文件
},
{
from: "portable.txt",
to: ".", // 确保portable.txt文件放在根目录
},
],
},
// 便携应用特定配置
portable: {
artifactName: "统计技能考试系统_便携版_${version}_${arch}.exe",
},
// 发布设置
publish: {
provider: 'generic',
url: 'https://example.com/',
},
// 全局禁用签名配置
forceCodeSigning: false,
asar: true,
},
},
},
};