Performance: Why deployment target affects architecture
This affects how fast the site loads and how smoothly it runs by influencing where and how code is executed and delivered.
Deploying an Astro site as a static site with pre-rendered HTML on a CDN or edge platform.
Deploying an Astro site as a fully client-side rendered SPA on a slow serverless platform without edge caching.| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Client-side SPA on slow serverless | High (many nodes created dynamically) | Multiple reflows during hydration | High paint cost due to JS execution | [X] Bad |
| Static site on CDN/edge | Low (static HTML) | Single reflow on initial load | Low paint cost, fast first paint | [OK] Good |
astro.config.mjs to set deployment adapters.adapter: netlify() inside the config file is the proper way.astro.config.mjs file -> Option Cimport vercel from '@astrojs/vercel';
export default {
adapter: vercel()
};adapter: netlify() in your config but get a build error saying the adapter is missing. What is the likely cause?Pass the test and this pattern moves unknown