Reputation: 9907
I am using electron-builder to package my app for windows, mac, and linux.
Resulting packages are all the same size but for Mac, the file is twice that size.
There's a huge app.asar.unpacked/
folder with frameworks from the build stage that are not needed.
How can I configure electronbuilder to skip these files?
This is my project.json
{
"name": "KioskeTV",
"description": "TV Application",
"version": "1.0.0",
"main": "app/src/main.js",
"scripts": {
"postinstall": "install-app-deps",
"start": "npm install && electron .",
"pack": "build --dir",
"dist": "build",
"dist:win": "build --platform win32"
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
"nobj.io",
"service",
"launcher"
],
"author": "Nebular Streams SLU",
"license": "Proprietary",
"devDependencies": {
"electron": "^2.0.0",
"electron-builder": "^20.26.1"
},
"build": {
"appId": "nobjio",
"dmg": {
"contents": [
{
"x": 110,
"y": 150
},
{
"x": 240,
"y": 150,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"target": [
"AppImage",
"deb"
]
},
"win": {
"target": "portable",
"icon": "build/icon.ico"
}
},
"dependencies": {
"app-builder-lib": "^20.27.1"
}
}
Upvotes: 1
Views: 1635
Reputation: 693
"ignore is an electron-packager option, and, must be specified in the build" This might get you pointed in the right direction. Good luck. Something like this in build:
ignore: function (
// TODO: add logic here
console.log(file);
return false;
Another Possibility: Use https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#ignore as regexp.
Upvotes: 1