> ## Documentation Index
> Fetch the complete documentation index at: https://vuemail.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment

> How to deploy the preview of your emails as a static website

`email build` turns the preview app into a static website, with every email rendered ahead of time,
so it can be deployed to any static hosting. Here's how to deploy it to Vercel.

**1. Add 'build' script to ./package.json**

```diff theme={null}
 {
   "scripts": {
+    "build": "email build"
   }
 }
```

Make sure `@vuemaildev/ui` is in your `devDependencies`, in the same version as `@vuemaildev/vuemail`,
since `email build` runs on it.

**2. Change 'Framework Preset' on Vercel's project settings to Other**

The build is a plain static website, so no framework is needed.

**3. Change 'Output Directory' to .vuemail**

In the end, your settings should look like this:

| Setting | Value |
| - | - |
| Framework Preset | Other |
| Build Command | `npm run build` |
| Output Directory | `.vuemail` |

> [!NOTE]
>
> The same works on other static hostings, like Netlify or Cloudflare Pages: run `email build`
> and publish the `.vuemail` directory. The preview has to be served from the root of its domain,
> not from a sub path.

To try the build locally, run [`email start`](https://vuemail.dev/docs/cli#email-start), which serves `.vuemail` on
[localhost:3000](http://localhost:3000).

A deployed preview is read-only: props can't be edited and there is no hot reloading, since every
email was rendered with its `PreviewProps` when it was built.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.