Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

perf(nuxt)!: use component loader to add meta components #8167

Merged
merged 3 commits into from Oct 13, 2022
Merged

perf(nuxt)!: use component loader to add meta components #8167

merged 3 commits into from Oct 13, 2022

Conversation

harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Oct 13, 2022

πŸ”— Linked issue

nuxt/nuxt#15151

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Rather than globally registering all meta components, this PR uses the component loader to register them. This should reduce initial bundle size by approx 3kB.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

codesandbox bot commented Oct 13, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Oct 13, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 4cca10a
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63482193df10790008ba6030

@harlan-zw harlan-zw changed the title fix(nuxt): on-demand head components performance(nuxt): on-demand head components Oct 13, 2022
@harlan-zw harlan-zw closed this Oct 13, 2022
@harlan-zw harlan-zw reopened this Oct 13, 2022
@danielroe danielroe changed the title performance(nuxt): on-demand head components perf(nuxt)!: use component loader to add meta components Oct 13, 2022
@Atinux Atinux requested a review from danielroe October 13, 2022 14:36
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, though it is a breaking change if users were relying on the global registration (e.g. calling resolveComponent('Script')).

Also related: #8145

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! It makes sense to import built-ins on demand and probably not a breaking change with dynamic access

@pi0 pi0 merged commit 577573f into nuxt:main Oct 13, 2022
@pi0 pi0 mentioned this pull request Oct 18, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants