-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
perf(head): drop @vueuse/head
dependency
#19519
Conversation
Β Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
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.
Nice!
π Nice! Unrelated @harlan-zw: Do you think it makes sense to deprecate |
Yup! This is planned once I sort out a couple more outstanding issues. |
@vueuse/head
dependency@vueuse/head
dependency
π Linked issue
β Type of change
π Description
Related: #19302
Switching to using Unhead directly allows for better tree-shaking (i.e @unhead/dom from server build), simplifies the code, and minimizes dependencies.
The issue with dropping the dependency is any modules or third-party code which used the pre-v1 API @vueuse/head and/or directly imported from it may break. The scope of that is quite hard to determine.
We can solve issue using a polyfill and an alias. If we're okay with potentially breaking code for some codebases relying on old low level @vueuse/head code, then we could ship without the polyfill enabled by default.
Without the polyfill, there's a 0.47kB client bundle improvement, otherwise, it's only 0.1kB. This unlocks further optimizations.
π Checklist