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

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

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Conversation

danielroe
Copy link
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

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
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