# Deploy Vue

A Vue single-page app is detected from its dependencies and `vite.config.ts`, 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) - a preview can point at a staging API while production uses the real one.

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

## Need a server?

Deploy the API as its own [backend app](/platform/frameworks#backend) and keep both in one repository with two [root directories](/create/application-settings#root-directory). Server-rendered Vue is [Nuxt](/platform/frameworks/nuxt).

## Related

- [Build settings](/create/build-settings): Install, build, and output configuration.
- [Nuxt](/platform/frameworks/nuxt): The server-rendered path for Vue.
- [Custom domains](/platform/custom-domains): Your own hostname on the CDN.
