This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
refactor(nuxt)!: move head
option support into defineNuxtComponent
#8901
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
β Deploy Preview for nuxt3-docs canceled.
|
Oh nice, this is a good idea. I'll make the mixin from #8908 opt-in |
Any updates on this? ππΌ What is a blocker? |
lgtm |
The issue at the moment is that this PR produces a separate, tiny |
I've looked into this a bit further and it seems inevitable from a rollup point of view, even if we were to move |
pi0
approved these changes
Nov 15, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Linked issue
https://github.com/nuxt/framework/discussions/8874
β Type of change
π Description
This PR moves support for
head
option intodefineNuxtComponent
to 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
useMeta
which has been deprecated for some time.useHead
is a drop-in replacement.π Migration
Anywhere you are using the Options API
head
hook, 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