-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Describe the bug
It seems that optimizeDeps.include
is able to resolve only dependencies that are defined in the root
workspace and its package.json
. In other words, you can optimize deps only from a single workspace.
After opening the repro, you will see this warning:
Failed to resolve dependency: jquery, present in 'optimizeDeps.include'
while react
gets optimized just fine because it's in the root workspace.
Expectation
optimizeDeps.include
should work for all dependencies across multiple workspaces. If these deps can be later resolved and served by Vite anyway I don't see a reason why they couldn't be prebundled as well.
Reproduction
https://stackblitz.com/edit/node-whfueq?file=app%2Fpackage.json
System Info
Stackblitz
Used Package Manager
pnpm
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.
Germain-condo-group, itsdouges, a2k42, rtritto, sarimarton and 4 more