Performance: Deploying to Vercel
This affects the initial page load speed and time to interactive by optimizing server response and asset delivery.
astro build && vercel deploy --prod (using Vercel CLI or Git integration)astro build && manually upload static files to a generic shared hosting without CDN or edge caching| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual upload to generic host | No change | No change | Higher due to slower resource load | [X] Bad |
| Deploy to Vercel with edge caching | No change | No change | Lower due to faster resource delivery | [OK] Good |
vercel.json to customize deployment settings.astro.config.js configures Astro itself, package-lock.json manages dependencies, and index.html is a page file.vercel.json snippet:{
"builds": [{ "src": "package.json", "use": "@vercel/node" }],
"routes": [{ "src": "/api/(.*)", "dest": "/api/index.js" }]
}@vercel/node with package.json, indicating a Node.js serverless function build./api/(.*) are sent to /api/index.js, directing API calls properly.output: 'server' in astro.config.mjs and using a Vercel adapter enables SSR.Pass the test and this pattern moves unknown