I have an issue building for distribution an electron app, on macOS.
I have some folders that are in the root dir of my project, next to my index.js, which I need to be included in my packaged app.
After trying by hardcoding each and every file inside of package.json, which didn't help, I ended up with the following block
"extraResources": [
{
"from": "files/",
"to": "files/",
"filter": [
"**/*"
]
},
{
"from": "assets/",
"to": "assets/",
"filter": [
"**/*"
]
},
{
"from": "accounts/",
"to": "accounts/",
"filter": [
"**/*"
]
}
]
If I run the .app it appears that the files are not there. Opening the Contents/Resources, I see they are there, so, toying around I discovered that the app is looking inside the app.asar container, where obviously the files are not.
I found a small hack by adding a couple of '..' in front of all my paths, so it goes outside the app.asar container but I really think this is a bit idiotic to be the solution to my issue.
Plus, I plan to build this for multiple platforms and I have a feeling that if I go through with this hacky way of fixing it, I'll have to create a hack for each platform, which I'd rather not do...

