-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to resolve workspace dependency present in 'optimizeDeps.include' #10047
Comments
Here I found a solution from this guy in several words - use Vite inside the workspace, not in the root |
The example doesn't use optimizeDeps (it was removed)?
|
I've the same issue, With the following schema: Package
Package
When adding |
@phiberber Have you tried @tajo The warning seems to be correct as you're starting the Vite server with the base set to |
i got this issue too! |
Going to close this following my comment above. |
Describe the bug
It seems that
optimizeDeps.include
is able to resolve only dependencies that are defined in theroot
workspace and itspackage.json
. In other words, you can optimize deps only from a single workspace.After opening the repro, you will see this warning:
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
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: