perf: lazy load Bluesky video player#2958
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughBluesky post embeds now accept an optional ChangesBluesky video embed loading
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| }>() | ||
| if (props.mediaHint === 'video') { | ||
| void import('~/components/VideoPlayer.vue') |
There was a problem hiding this comment.
didnt use preloadComponent because this only works with globally registered components.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
alexdln
left a comment
There was a problem hiding this comment.
Ah, looks great, thank you 🤍🚀
🔗 Linked issue
None (but perf is always good!)
📚 Description
This PR lazy-loads the Bluesky video player so non-video Bluesky embeds no longer pull in the full HLS player chunk if they dont need it.
Optionally, a
media-hint="video"preload hint for known video posts can be set, which starts loading the video player earlier while still rendering only when post.embed?.playlist is present. This is optional but recommended when we know the content.During tests, HLS split into its own (now optional) chunk at about 152.2 KB gzip, with the Bluesky embed chunk staying small at about 2.1 KB gzip.