Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding extra resources includes the entire local repository #3334

Closed
3 tasks done
msimoni18 opened this issue Sep 1, 2023 · 8 comments
Closed
3 tasks done

Adding extra resources includes the entire local repository #3334

msimoni18 opened this issue Sep 1, 2023 · 8 comments
Assignees

Comments

@msimoni18
Copy link

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • 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

@elranu
Copy link

elranu commented Oct 24, 2023

no news here? @msimoni18 did you find a workaround?

@msimoni18
Copy link
Author

@elranu No, I haven't found any workaround. I think this may be the intended behavior.

@nicokimmel
Copy link

Even without extraResources it copies the whole project folder into resources/app.

@erickzhao
Copy link
Member

erickzhao commented Nov 1, 2023

@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?

@msimoni18
Copy link
Author

@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.

@caoxiemeihao
Copy link
Member

Can you upgrade @forge/plugin-vite to 7.3.0+ ?

@BotellaA
Copy link

We have the same issue with the entire app folder copied including node_modules... Any progress or workaround?

@erickzhao
Copy link
Member

Might fold this into #3738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants