Performance: Static adapter deployment
This affects the initial page load speed by pre-rendering pages as static files, reducing server processing time.
import adapter from '@sveltejs/adapter-static'; export default { kit: { adapter: adapter({ pages: 'build', assets: 'build', fallback: null }) } };
import adapter from '@sveltejs/adapter-node'; export default { kit: { adapter: adapter(), } };
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Server-side rendering on request | Dynamic DOM creation per request | Multiple reflows due to delayed content | Higher paint cost due to late HTML | [X] Bad |
| Static adapter deployment | Static DOM from pre-built HTML | Single reflow on initial load | Lower paint cost with immediate content | [OK] Good |
svelte.config.js?svelte.config.js snippet, what will be the output folder after building?
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: null
})
}
};svelte.config.js adapter config is correct?Pass the test and this pattern moves unknown