Performance: Adapter configuration
MEDIUM IMPACT
Adapter configuration affects how the SvelteKit app is built and deployed, impacting server response time and initial page load speed.
import adapter from '@sveltejs/adapter-node'; export default { kit: { adapter: adapter() } };
import adapter from '@sveltejs/adapter-static'; export default { kit: { adapter: adapter() } };
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Static Adapter on Dynamic Server | More client DOM updates | Multiple reflows due to client hydration | Higher paint cost from larger bundle | [X] Bad |
| Node Adapter on Dynamic Server | Minimal client DOM updates | Single reflow on initial render | Lower paint cost with smaller bundle | [OK] Good |