Adding extra resources includes the entire local repository
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.4.1
Electron version
26.1.0
Operating system
macOS 12.6.5
Last known working Electron Forge version
No response
Expected behavior
When including the following code in forge.config.ts, I expected to only see a folder called resources in process.resourcesPath.
packagerConfig: {
extraResource: ['./resources'],
},
Actual behavior
Instead, there is also a folder called app that contains the entire local repository, making the final package almost 1GB. Without extraResource, the app folder does not show up in process.resourcesPath.
Steps to reproduce
Add a folder in a top level directory, add that folder as an extraResource, then run electron-forge make.
Additional information
No response
no news here? @msimoni18 did you find a workaround?
@elranu No, I haven't found any workaround. I think this may be the intended behavior.
Even without extraResources it copies the whole project folder into resources/app.
@msimoni18 can you clarify if you're using a specific set of plugins/templates, or if this behaviour is reproducible with the base Forge config?
@erickzhao I created a project using this template. Then I added a folder with some random files in a folder and added it as an extra resource in forge.config.ts. If you need me to, I can create a sample repo demonstrating this issue.
Can you upgrade @forge/plugin-vite to 7.3.0+ ?
We have the same issue with the entire app folder copied including node_modules... Any progress or workaround?
Might fold this into https://github.com/electron/forge/issues/3738