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

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

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

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

Conversation

@danielroe
Copy link
Copy Markdown
Member

@danielroe danielroe commented Aug 30, 2022

🔗 Linked issue

resolves nuxt/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.

@danielroe danielroe 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 pi0 August 30, 2022 13:26
@danielroe danielroe self-assigned this Aug 30, 2022
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 30, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit 704ecc9
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/630e1024f8f7260008c651a1

Copy link
Copy Markdown
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.

Thanks!

@pi0 pi0 merged commit a520185 into main Aug 30, 2022
@pi0 pi0 deleted the perf/global-prefetch branch August 30, 2022 14:41
@pi0 pi0 mentioned this pull request Sep 1, 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

3.x bug Something isn't working 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused global components are prefetched

2 participants