# Share a Vite Build — Send the dist/ Folder, Not a Screenshot

Canonical: https://commareports.com/share-vite-build
Published: 2026-09-12

> `vite build` writes dist/ with hashed assets under /assets/. Publish the folder to Comma for a preview URL that hydrates, with comments anchored to the rendered UI.

# Share a Vite build

`vite build`, `dist/`, and then the question that has no good answer: how does
a designer who does not run your repo click on this?

`vite preview` is localhost. A deploy is a deploy. So most teams send a
screenshot and review a picture of an app.

## Build

```bash
npm run build
# → dist/
```

If you want the folder to also work when opened directly from disk, build with
relative asset paths:

```js
// vite.config.js
export default { base: "./" };
```

Absolute `/assets/…` paths are fine once the folder is published over HTTP —
the relative base only matters for `file://`.

## Publish dist/

Drag it into [the app](https://commareports.com/), or zip and POST:

```bash
cd dist && zip -qr ../dist.zip . && cd ..

curl -fsS -X POST https://commareports.com/api/v1/reports \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -F "title=Preview — $(git rev-parse --short HEAD)" \
  -F "visibility=team" \
  -F "bundle=@dist.zip"
```

Zip from inside `dist` so `index.html` is at the archive root — a wrapper
folder is the usual cause of a 404 on the entry point. See
[sharing a folder of HTML files](/share-html-folder).

## What you get over a screenshot

- **Anchored threads** — feedback lands on the element. See
  [commenting on HTML](/comment-on-html).
- **Revisions at one URL** — one report id per branch, one revision per push.
- **Access per report** — private, team-only, domain-gated, or unlisted for a
  client. See the [sharing model](/docs/sharing).
- **Nothing to keep running** — no staging environment, no preview quota.

## Limits

- **Assets: 25 MB per file, 250 MB and 500 files per report.** Drop
  `**/*.map` before zipping if you are near the file cap.
- **Entry HTML: 5 MB.**
- **60 requests/minute per token.**

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision
history.

**[Publish a build preview →](https://commareports.com/)**

### Related

- [Share a SvelteKit build](/share-sveltekit-site) · [Share an Angular build](/share-angular-build)
- [Share a Storybook static build](/share-storybook-static) · [Share an Astro site](/share-astro-site)
- [Share a folder of HTML files](/share-html-folder) · [Stop screenshotting reports](/stop-screenshotting-reports)
