Electron-Forge packaging whole project


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

So for example my app structure is




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?


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": [

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


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