You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

60 lines
2.3 KiB

const {defineConfig} = require('@vue/cli-service')
module.exports = defineConfig({
// 禁用eslint
lintOnSave: false,
transpileDependencies: true,
//添加预加载脚本
pluginOptions:{
electronBuilder:{
preload: {
preload: 'src/preload.js' // 确保路径正确
},
builderOptions: {
appId: 'com.utils.hub',
productName: 'UtilsHubDemo',
directories: {
output: 'build'
},
extraResources: [
{
"from": "config.json",
"to": "../config.json", // 打包到资源目录外
"filter": ["**/*"]
},
{
"from": "未上传目录",
"to": "../未上传目录/", // 打包到资源目录外
"filter": ["**/*"]
},
{
"from": "api.log",
"to": "../api.log", // 打包到资源目录外
"filter": ["**/*"]
}
],
win: {
// 应用图标,这里要确保图标文件存在且路径正确,一般为.ico 格式
icon: 'public/winIcon/app.ico',
// 目标架构,可以是 x64、ia32 等,根据实际需求选择
target: [
{
target: 'nsis', // 使用 NSIS 打包
arch: ["ia32"] // 指定架构
}
]
},
// win: {
// // 应用图标,这里要确保图标文件存在且路径正确,一般为.ico 格式
// icon: 'public/winIcon/app.ico',
// // 目标架构,可以是 x64、ia32 等,根据实际需求选择
// target: [
// {
// target: 'nsis', // 使用 NSIS 打包
// arch: ['x64'] // 指定架构
// }
// ]
// },
}
}
}
})