perf: preload API specs fetch in SSR head#146
Conversation
Browser starts fetching /api/specs as soon as <head> is parsed, overlapping with JS bundle download instead of waiting for it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR adds a preload link for API specifications in the SSR entry point's head. When a route is an API route and has a version directory, the preload targets the versioned specs endpoint ( ChangesAPI Specs Preload
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
Summary
<link rel="preload" as="fetch">for/api/specsin SSR<head>on API routesTest plan
bun run build:cli)isApiRoute)/api/specsfetch starts before JS execution🤖 Generated with Claude Code