What is a SvelteKit adapter and how do adapter-static and adapter-node differ?

Tests your grasp of SvelteKit's deployment abstraction. A strong answer outlines how adapters compile the app for a target platform, contrasting adapter-static's CDN-ready HTML with adapter-node's server-side request handler for Node environments.
What's really being asked
This question probes whether you understand SvelteKit's build architecture and the separation between framework code and deployment targets. The interviewer wants to see that you know an adapter is not the bundler itself but a post-build transformer that shapes the Vite output for a specific runtime. They also want to hear a clear distinction between static site generation and serverful Node deployment, including the trade-offs in capability and hosting cost.
The full answer
First, define an adapter as a small plugin configured in svelte.config.js that runs during vite build and turns the framework-agnostic build artifacts into a platform-specific output. Second, explain adapter-static: it pre-renders pages into HTML files at build time, making it ideal for content sites deployed to static hosts like GitHub Pages or Cloudflare Pages; it lacks a running server so API routes and server hooks require prerender configuration or a fallback page. Third, explain adapter-node: it produces a Node server, often with a built-in request handler like a Polka or Express-compatible middleware, enabling dynamic server-side rendering, form actions, and API endpoints on traditional VPS or container platforms. Fourth, mention that the choice depends on whether your app needs dynamic per-request logic or can survive as static files.
The mistakes people make
A red flag is saying an adapter is a Vite plugin that handles code bundling; bundling is Vite's job, while the adapter only repackages the already-bundled output. Another mistake is claiming adapter-static supports server routes out of the box; without dynamic rendering, those routes fail unless explicitly handled. Conversely, some candidates suggest adapter-node is needed for every SvelteKit app, missing that static export eliminates server overhead for sites that do not need SSR.
What usually comes next
The interviewer may ask how to handle environment variables or secrets when switching between static and server adapters, since static builds bake values in at build time while Node servers can read runtime env. They might also ask about edge adapters like Cloudflare or Vercel, or how to write a custom adapter for an internal platform. You should also be ready to discuss the platform property on RequestEvent, which carries adapter-specific context such as Cloudflare KV bindings.
A concrete example
Imagine a marketing blog with no user sessions and a contact form handled by a third-party API. Using adapter-static, you prerender every article into HTML, set fallback to true for the contact page, and deploy to a CDN for near-zero hosting cost. If the same blog later adds user comments stored in a database and requires server-side pagination, you would switch to adapter-node, deploy to a VPS, and implement load functions that query the database on each request.
Interview question
What is a key architectural difference between adapter-static and adapter-node?
- a.adapter-static pre-renders pages into HTML files at build time, whereas adapter-node produces a Node server for dynamic requestsCorrect
- b.adapter-static supports dynamic API routes and server hooks by default, whereas adapter-node only serves static files
- c.adapter-static bundles application code with Vite, whereas adapter-node relies on Rollup for bundling
- d.adapter-node generates static HTML for CDN hosts, whereas adapter-static requires a Node server on a VPS
Why? this is the answer
adapter-static outputs static HTML for CDN deployment while adapter-node creates a running Node server capable of SSR and API routes. A is tempting but wrong because Vite handles bundling; an adapter only repackages the already-bundled output for a specific platform.
Just read this? Test yourself on what you have been reading.
Read the original → svelte.dev
- #sveltekit
- #adapters
- #static-site-generation
- #nodejs
- #deployment
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles