Vue CLI Plugin Electron Builder
文档
Simply add an icons/icon.png file to the build resources directory (opens new window)and electron-builder will use it on all platforms. Unless you have manually configured the build resources directory, the icon should go in build/icons/icon.png, relative to your app’s root.
配置项
module.exports = {
//...
pluginOptions: {
electronBuilder: {
preload: 'src/preload.js',
builderOptions: {
mac: {
icon: 'build/icons/icon.png'
}
}
// Or, for multiple preload files:
// preload: { preload: 'src/preload.js', otherPreload: 'src/preload2.js' }
},
},
//...
};