perf: only load vue-data-ui css in components that use it#1918
perf: only load vue-data-ui css in components that use it#1918
vue-data-ui css in components that use it#1918Conversation
Co-authored-by: Anthony Fu <github@antfu.me>
vue-data-ui css in components that use it
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR refactors the CSS loading strategy for the vue-data-ui library. Instead of loading styles globally via the Nuxt configuration, the styles are now dynamically imported within individual Vue components that utilise the library (TrendsChart, VersionDistribution, and WeeklyDownloadStats). The global CSS reference is removed from nuxt.config.ts, transitioning from centralised to component-level stylesheet loading. Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
|
I even got 17kb diff locally - it went into a separate bundle and only loaded where there are charts 🔥 |
🔗 Linked issue
🧭 Context
📚 Description
this is an experiment to decrease blocking time of initial load (from css size) by only loading vue-data-ui css when we need it
it seems to drop ~7kb from the initial load: