Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

Merged
pi0 merged 3 commits into
nuxt:mainfrom
harlan-zw:fix/head-components-on-demand
Oct 13, 2022
Merged

perf(nuxt)!: use component loader to add meta components#8167
pi0 merged 3 commits into
nuxt:mainfrom
harlan-zw:fix/head-components-on-demand

Conversation

@harlan-zw

@harlan-zwharlan-zw commented Oct 13, 2022

Copy link
Copy Markdown
Collaborator

🔗 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
Copy Markdown

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

@netlify

netlifyBot commented Oct 13, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit4cca10a
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63482193df10790008ba6030

@harlan-zwharlan-zw changed the title fix(nuxt): on-demand head componentsperformance(nuxt): on-demand head componentsOct 13, 2022
@harlan-zwharlan-zw reopened this Oct 13, 2022
@danielroedanielroe changed the title performance(nuxt): on-demand head componentsperf(nuxt)!: use component loader to add meta componentsOct 13, 2022
@atinux
atinux requested a review from danielroeOctober 13, 2022 14:36

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

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

pi0
pi0 approved these changes Oct 13, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

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:mainOct 13, 2022
@pi0pi0 mentioned this pull request Oct 18, 2022
Sign up for freeto 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.

3 participants

@harlan-zw@pi0@danielroe