-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
refactor!: remove resolvePackageEntry
and resolvePackageData
APIs
#14584
Conversation
I guess it's #12957 (comment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me! You're really pushing hard to clean up things in Vite 😄
It would be good to see what Anthony thinks given that it affects sli.dev though. And I wonder if Vite should export similar utilities in the future (once optimizations are done and you are happy with the new API). It seems useful for plugins to get the exact same handling of package.json as Vite and also take advantage of the cache.
Co-authored-by: 翠 / green <[email protected]>
Yeah once this is unblocked we should be able to refine the API to be public again for sure 👍 (especially the |
I think we can hold off merging for now and get qwik and slidev migrated first. |
Out of curiosity, is there a detailed explanation of the optimizations blocked by this API, the bugs caused by it, and how removing it will fix them? From a quick look, I have no packages depending on the API. |
|
I've sent the PRs upstream to remove them. Will go ahead and merge this. |
Description
They are preventing caching optimizations that we can do. IIRC the
setResolvedCache
API isn't correct too and is causing bugs. (have to find the issue#12957 (comment))Additional context
After a lot of yak shaving, I finally got to what I wanted to do!
Admittedly I didn't plan this ahead since it would be better with a deprecation phase, but I think it's fine as these APIs are rather internal.
GitHub search for resolvePackageEntry and resolvePackageData usage
Unfortunately
resolvePackageEntry
affects some Vite plugins, andresolvePackageData
affects two big projects:qwik
andslidev
. But their usage are simple enough that the migration guide should work.What is the purpose of this pull request?