-
-
Notifications
You must be signed in to change notification settings - Fork 600
Description
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.
Forge version
7.10.2
Electron version
31.2.1
Operating system
macOS 15.5 (24F74)
Last known working Forge version
7.4.0
Expected behavior
The command npm run build:electron should bndle the app correctly with only the necessary dependencies
Actual behavior
Runtime Error: The app fails at runtime with Error: Cannot find module '...' for essential runtime dependencies (electron-updater, electron-log, etc.).
Package Bloat: The final app size increases dramatically from the expected
Steps to reproduce
This is the most important section, proving the bug is a regression.
Start with a clean project using a recent template (npm init electron-app@latest -- --template=vite-typescript).
Working Version (Pinning the fix):
Change @electron-forge/plugin-vite dependency to 7.4.0. (changed in package.json from ^7.4.0 to 7.4.0)
Run npm install and npm run make.
Result: App works, size is
Broken Version (The regression):
Change @electron-forge/plugin-vite dependency to ^7.4.0 (or explicitly 7.5.0 or higher).
Run npm install and npm run make.Result: App is large (
Additional information
My package.json dependencies (this is with the fix using specific version "@electron-forge/plugin-vite": "7.4.0", changing back to "@electron-forge/plugin-vite": "^7.4.0" reintroduces the issue):
devDependencies": {
"@builtwithjavascript/countdown": "^1.1.0",
"@builtwithjavascript/debounce": "^1.0.5",
"@builtwithjavascript/file-input-validator": "^1.0.7",
"@builtwithjavascript/use-click-outside": "^1.0.1",
"@builtwithjavascript/vue-file-upload": "^1.0.9",
"@electron-forge/cli": "^7.4.0",
"@electron-forge/maker-deb": "^7.4.0",
"@electron-forge/maker-rpm": "^7.4.0",
"@electron-forge/maker-squirrel": "^7.4.0",
"@electron-forge/maker-zip": "^7.4.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.4.0",
"@electron-forge/plugin-fuses": "^7.4.0",
"@electron-forge/plugin-vite": "7.4.0",
"@electron-forge/publisher-s3": "^7.5.0",
"@electron/fuses": "^1.8.0",
"@headlessui/vue": "^1.6.4",
"@heroicons/vue": "^2.0.13",
"@number-flow/vue": "^0.2.3",
"@testing-library/user-event": "^14.5.2",
"@testing-library/vue": "^8.1.0",
"@types/culori": "^2.1.1",
"@types/luxon": "^3.4.2",
"@types/node": "^20.14.11",
"@uivjs/vue-markdown-preview": "^1.0.5",
"@vitejs/plugin-vue": "^6.0.0",
"autoprefixer": "^10.4.19",
"chart.js": "^4.4.3",
"compromise": "^14.14.0",
"culori": "^4.0.1",
"dexie": "^4.0.8",
"echarts": "^5.5.1",
"electron": "31.2.1",
"electron-builder": "^25.0.5",
"electron-osx-sign": "^0.6.0",
"fast-xml-parser": "^4.0.9",
"jsdom": "^25.0.0",
"json-server": "^1.0.0-beta.2",
"luxon": "^3.4.4",
"node-machine-id": "^1.1.12",
"onchange": "^7.1.0",
"postcss": "^8.4.41",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.6",
"ts-node": "^10.9.2",
"typescript": "^5.5.3",
"underlog": "^1.3.3",
"vite": "^7.0.3",
"vite-plugin-mkcert": "^1.17.8",
"vite-plugin-pwa": "^1.0.3",
"vitest": "^3.2.4",
"vue-i18n": "^11.1.9",
"vue-tsc": "^3.0.1"
},
"dependencies": {
"electron-log": "^5.2.0",
"electron-squirrel-startup": "^1.0.1",
"electron-updater": "^6.3.4",
"vue": "^3.5.17"
}