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

perf(nuxt): don't prefetch all global components - #7069

Merged
pi0 merged 1 commit into
mainfrom
perf/global-prefetch
Aug 30, 2022
Merged

perf(nuxt): don't prefetch all global components#7069
pi0 merged 1 commit into
mainfrom
perf/global-prefetch

Conversation

@danielroe

@danielroedanielroe commented Aug 30, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14675

❓ 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

This removes global components from being prefetched by default. (They will still be preloaded if they are used on the page being rendered on the server.)

👉 Migration

This isn't a breaking change as such, but users who are heavily using dynamic/global components, such as with a catchall page rendering CMS content or page building libraries, will likely want to use the prefetchComponents and preloadComponents utilities. (At the moment they do the same thing, but should semantically match the difference between link preload/prefetch.)

📝 Checklist

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

@danielroedanielroe added bug Something isn't working 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing performance labels Aug 30, 2022
@danielroe
danielroe requested a review from pi0August 30, 2022 13:26
@danielroedanielroe self-assigned this Aug 30, 2022
@netlify

netlifyBot commented Aug 30, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit704ecc9
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/630e1024f8f7260008c651a1

pi0
pi0 approved these changes Aug 30, 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.

Thanks!

@pi0
pi0 merged commit a520185 into mainAug 30, 2022
@pi0
pi0 deleted the perf/global-prefetch branch August 30, 2022 14:41
@pi0pi0 mentioned this pull request Sep 1, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingperformance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused global components are prefetched

2 participants

@danielroe@pi0