Uh oh!
There was an error while loading. Please reload this page.
refactor(nuxt)!: move head option support into defineNuxtComponent - #8901
Conversation
|
✅ Deploy Preview for nuxt3-docs canceled.
|
harlan-zw
commented
Nov 11, 2022
Oh nice, this is a good idea. I'll make the mixin from #8908 opt-in |
pi0
commented
Nov 15, 2022
Any updates on this? 🙏🏼 What is a blocker? |
harlan-zw
commented
Nov 15, 2022
lgtm |
danielroe
commented
Nov 15, 2022
The issue at the moment is that this PR produces a separate, tiny |
danielroe
commented
Nov 15, 2022
I've looked into this a bit further and it seems inevitable from a rollup point of view, even if we were to move |
🔗 Linked issue
https://github.com/nuxt/framework/discussions/8874
❓ Type of change
📚 Description
This PR moves support for
headoption intodefineNuxtComponentto allow proper tree-shaking of used composables and avoid registering a global mixin that runs on every single component.This PR also removes legacy support for
useMetawhich has been deprecated for some time.useHeadis a drop-in replacement.👉 Migration
Anywhere you are using the Options API
headhook, you can instead wrap the component withdefineNuxtComponent. (Or alternatively you may decide to use a component like<Meta>,<Link>, etc.)Anywhere you are using
useMeta, you should replaceuseHead.📝 Checklist