-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
feat: optimizeDeps.disabled #7646
Conversation
+1 for |
@bluwy we are going to get TS errors like:
And it actually makes it harder to use. I also like |
Good point, it does make it harder to use internally and externally. What about |
Interesting. It would still be a breaking in the types. As
But at least it is easy to use if we set it I think this is a better API though. @antfu, what do you think? Maybe we should use |
I think we could introduce both. |
Oh, I like it. Almost no one will disable it, so we shouldn't make everybody pay for this feature. Ok, I'm going to change the PR 👍🏼 |
Is it safe for type mismatches between the user config and resolved config? I'm also not sure if |
We already have a mismatch, as currently User Config is |
Yeah perhaps that is fine now thinking more about it. It feels weird initially as we're deriving a different resolved config shape based on the user config, but there's
That's true too. I thought there wouldn't be a reason to access |
Updated, and marked as experimental. @antfu I think we could merge this feature as experimental and undocumented and release it in the next patch as Vitest is going to be the only consumer until Vite 3.0. And we can discuss in a team meeting before the v3 release to accept or modify this API. What do you think? |
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
This is causing issues in Marko: https://github.com/vitejs/vite-ecosystem-ci/runs/6001834896?check_suite_focus=true I'm going to revert the |
Description
See vitest-dev/vitest#485 (comment) for context.
Vitest is currently trying to disable deps optimization by using
optimizeDeps: { entries: [] }
, but this only avoids scanning.I choose
optimizeDeps: { disabled: true }
to avoid a breaking change, but if we want to switch tooptimizeDeps: OptimizeDepsOptions | false
in ResolvedConfig we could do that instead and push this in Vite 3.0.What is the purpose of this pull request?