# Deploy Svelte

A Svelte single-page app (Vite-based, no SvelteKit server) is detected from its dependencies and deploys as a static site: `npm run build` fills `dist/`, and the CDN serves it with [free bandwidth](/billing/pricing#static-sites). No server, no region, no cold starts.

## Build

- **Output directory:** `dist` - override in [Build settings](/create/build-settings#output-directory) if your config moves it.
- **Install:** follows your lockfile - see [How detection works](/platform/frameworks#how-detection-works).

## Environment variables

Static builds run [with the environment's variables set](/platform/environment-variables#build-time-and-runtime), so `VITE_*` values inline as usual, per [environment](/platform/preview-environments).

> [!WARNING]
> Inlined values ship to every browser - never put secrets behind `VITE_`.

## SvelteKit instead?

Routing, server load functions, or form actions mean [SvelteKit](/platform/frameworks/sveltekit) - a container under the SSR policy, or `adapter-static` back to the CDN.

## Related

- [SvelteKit](/platform/frameworks/sveltekit): The full-framework path for Svelte.
- [Build settings](/create/build-settings): Install, build, and output configuration.
- [Custom domains](/platform/custom-domains): Your own hostname on the CDN.
