Electron-Forge packaging whole project


#1

I’m trying to package a project but Electron-Forge is packaging the whole root folder.

So for example my app structure is

/bin
app/
js/

index.js


#2

Since I accidentally posted and can’t edit I’ll summarize here.

When you pakcage an app using electron-forge package. it will package everything in that folder. So if your project root includes files you don’t want to package, those get included as well.

Even if you set the ‘dir’ property in the elctron-packager config block, that value gets ignore and the entire root folder is packaged.

Anyone know if there is a way to change this?


#4

I think I based my project on the boilerplate created by electron-forge (with react template), but here’s a possibly relevant part of my package.json build config:

{
    "build": {
        "productName": "ElectronReact",
        "appId": "org.develar.ElectronReact",
        "files": [
            "src/",
            "node_modules/"
        ]
    }
}

I’m actually looking through the docs for where that is explained but I’m forgetting the way.


#5

crunchex - I tried your JSON block but no dice. Where in your package.json do you put that bit?