-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Open
Copy link
Labels
Description
Describe the bug
Environment
- Vite: 7.3.1
- Rollup: 4.59.0
- Nuxt: 4.2.2
- Node: 20.x
Describe the bug
Build fails with TypeError: dependentEntriesByModule.get is not a function or its return value is not iterable when project has
2400+ modules.
Steps to reproduce
- Large Nuxt 4.2.x project (2400+ modules)
- Run
nuxt build - After "✓ N modules transformed" → build fails with this TypeError
Workaround
// nuxt.config.ts
vite: {
build: {
rollupOptions: {
treeshake: false // disables tree shaking — increases bundle size
}
}
}
Expected behavior
Build completes successfully with tree shaking enabled.
Notes
- Error only occurs with 2400+ modules (small projects pass)
- Introduced in Vite 7.3.x (7.2.x was fine)
- dependentEntriesByModule appears to be an internal Rollup/CommonJS plugin API
### Reproduction
https://github.com/blackundo/m.ushort-frontend
### Steps to reproduce
_No response_
### System Info
```shell
System:
OS: macOS 26.0.1
CPU: (8) arm64 Apple M1
Memory: 100.64 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 25.2.1 - /opt/homebrew/bin/node
Yarn: 1.22.21 - /opt/homebrew/bin/yarn
npm: 11.6.2 - /opt/homebrew/bin/npm
pnpm: 10.7.1 - /Users/blackundo/.npm-packages/bin/pnpm
Browsers:
Safari: 26.0.1Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable