[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
7.2.0
Electron version
28.1.3
Operating system
Windows 11
Last known working Electron Forge version
-
Expected behavior
According to electron-packager, devDependencies should not be included in the final app.
Actual behavior
They are included in the final app, and it has nothing to do with this issue. It happens even on the hello-world app.
Note: For simplicity, below I didn't set packagerConfig: {asar: true}. However, even if you generate an asar, when you inspect the content of that asar by using asar list app.asar, you see the exact same content like without using it.
After running electron-forge make, in the output directory you can see node_modules, even if I didn't declare any dependencies, but only devDependencies:
This is working as expected, I think the empty folders are a consequence of how the Galactus module that we use to do the pruning handles @scoped packages, but it does remove all module files despite leaving the empty folder behind.
Pre-flight checklist
Electron Forge version
7.2.0
Electron version
28.1.3
Operating system
Windows 11
Last known working Electron Forge version
-
Expected behavior
According to electron-packager,
devDependencies
should not be included in the final app.Actual behavior
They are included in the final app, and it has nothing to do with this issue. It happens even on the hello-world app.
Note: For simplicity, below I didn't set
packagerConfig: {asar: true}
. However, even if you generate anasar
, when you inspect the content of thatasar
by usingasar list app.asar
, you see the exact same content like without using it.Steps to reproduce
Create a
main.js
file with containing:Create a
preload.js
file with containing:Create a
index.html
file containing:Create a
package.json
file containing:Create a
forge.config.js
file containing:After running![image](https://github.com/electron/forge/assets/151059539/978b8447-bd21-4dab-8993-6fb28352be40)
electron-forge make
, in the output directory you can seenode_modules
, even if I didn't declare anydependencies
, but onlydevDependencies
:Additional information
No response