bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
307 stars 82 forks source link

Unable to build using app specific package.json #270

Open LucasMontero opened 5 months ago

LucasMontero commented 5 months ago

I have a NX file structure that looks like the following:

workspace-name/ ├── apps/ │ ├── electron-app-1/ │ │ ├── ... │ │ ├── package.json # Package manifest for Electron app 1 │ ├── electron-app-1-front/
│ │ ├── ...
│ ├── electron-app-2/ │ │ ├── ... │ │ ├── package.json # Package manifest for Electron app 2
│ ├── electron-app-2-front/
│ │ ├── ...
│ ├── ...
│ └── package.json # Main package json (Dependencies, scripts...)

All works with normality but when I build each app, info like name, description... comes from the main package.json instead of the specific ones that I set for every app.

This means that, for example, when I try to access the UserData path on Electron, the folder that will be created is one with the name specified in the main package.json but I would need them to be called as the name that I specify on the package.json inside each app.

How could I set them to be build using the correct data from each package.json?

Related #228

mohasarc commented 5 months ago

I'm facing a similar issue. Although I've generated a separate package.json into dist/apps/electron-app, and it is infact eventually bundled with the app. Yet, while packaging or making the app the root's package.json is being used for description, version or author fields.