Menu
svelte-smol docs

Adapter Options

adapter({
  out: "build",
  name: "server",
  compile: true,
  target: undefined,
  bytecode: false,
  minify: false,
  sourcemap: false,
  precompress: false,
  healthcheck: true,
  envPrefix: "",
  serveAssets: true,
  serveOptions: {},
});
OptionDefaultDescription
out"build"Output directory. Holds the executable plus client/ and prerendered/.
name"server"Executable filename inside out. Ignored with compile: false (the bundle is always index.js).
compiletruefalse emits a plain index.js bundle run with bun — see Native addons.
targethost platformCross-compile target, e.g. "bun-linux-x64". See Deployment.
bytecodefalseEmbed a V8 bytecode cache: faster cold start, bigger binary.
minifyfalseMinify the bundled server code.
sourcemapfalseEmbed a source map so server stack traces point at original code.
precompressfalseEmit .br / .gz siblings for assets and prerendered pages, served when Accept-Encoding allows.
healthchecktrueCompile the healthcheck binary and expose GET /_health. Pass { path: "/healthz" } to move the endpoint.
envPrefix""Namespace for the runtime env vars — see Environment variables.
serveAssetstrueServe client/ and prerendered/ from the executable. Turn off when a proxy/CDN serves them.
serveOptions{}Extra Bun.serve() options (tls, reusePort, maxConnections, error, …).

serveOptions

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 (IDLE_TIMEOUT, BODY_SIZE_LIMIT, HOST/PORT, SOCKET_PATH) for those.

adapter({
  serveOptions: {
    tls: { cert: Bun.file("cert.pem"), key: Bun.file("key.pem") },
  },
});

This guide lives in the project repo: edit it there, and this page follows within a day.