10 guides · synced daily from GitHub
svelte-smol docs
A SvelteKit adapter that compiles your app to one standalone binary with Bun. No node_modules to ship, built-in healthcheck for Docker.
Getting started
Install the adapter and ship your first binary.
Getting Started
Turn a SvelteKit app into a single standalone executable in a few minutes.
Adapter options
These are merged in before the adapter's own fields (fetch, idleTimeout, maxRequestBodySize, hostname/port/unix, websocket), so they can add to the server but not override request handling. Use the matching env vars (IDLETIMEOUT, BODYSIZELIMIT, HOST/PORT, SOCKETPATH) for those.
SvelteKit 3
The same package supports SvelteKit 3 (currently a prerelease). The adapter detects which SvelteKit is building the app and runs the matching implementation, so there is nothing to switch. On SvelteKit 3, static assets and prerendered pages are embedded in the executable, and the options follow the official @sveltejs/adapter-bun.
Running in production
Configure, deploy and put it behind a proxy.
Environment variables
Runtime settings are read from the environment when the executable starts — nothing is baked in at build time.
Deployment
Ship the whole build/ directory. With serveAssets: false, the executable alone is enough — a proxy or CDN serves client/ and prerendered/.
Health Check
With healthcheck on (the default) the build produces a second, tiny executable — build/healthcheck — and the server answers GET /health:
Reverse Proxy
Behind a proxy, the server sees the proxy's connection, not the browser's. Tell it where the real URL and client address come from.
Native Addons
Pure-JS dependencies are still bundled into index.js. A native addon's require stays in the output and resolves from nodemodules at runtime, looked up from index.js's own location — the working directory doesn't matter. A production install is enough:
Internals
How the code fits together.