Skip to content

Bug: @electron-forge/plugin-vite v7.5.0+ introduces incorrect dependency pruning and package bloat (up to 1.1GB) compared to v7.4.0. #4045

Open

Description

@damianof

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 $\approx 263 \text{ MB}$ (on v7.4.0) to $\approx 1.1 \text{ GB}$ (on v7.5.0+), indicating an incorrect inclusion of the development node_modules directory.

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 $\approx 263 \text{ MB}$.

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 ($\approx 1.1 \text{ GB}$) OR fails with dependency errors.

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"
}

Activity

  1. added theissue type on Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions