# Share a Next.js Static Export — Preview a Build Without Deploying It

Canonical: https://commareports.com/share-nextjs-static-export
Published: 2026-09-01

> next build with output: 'export' writes a static out/ directory. Publish it to Comma for a private preview link with anchored comments, without provisioning a deploy target.

# Share a Next.js static export

Preview deployments are a solved problem right up until they are not: a
fork without secrets, a client who should not see a public preview URL, a
build you want reviewed before the project has any infrastructure at all.

`output: 'export'` gives you a static `out/` directory in those cases.
The remaining question is the same one as always — where does it go so
one other person can look at it.

## Publish the build

```js
// next.config.js
module.exports = { output: "export", images: { unoptimized: true } };
```

```bash
next build
```

Drag `out/` (or a zip of it) into [the app](https://commareports.com/):

- `index.html` becomes the report body.
- CSS, JS, fonts and images upload as assets, with their references
  rewritten to the uploaded copies — the step that decides whether the
  preview renders or shows [a page with no styles](/html-report-broken-css).
- Scripts run inside a sandboxed iframe, so client-side React, routing
  within the exported pages, and interactive components keep working.

Leave `basePath` and `assetPrefix` unset for a preview build. Both bake
in a hostname the preview is not being served from.

## What a static export cannot do

API routes, middleware, server actions, ISR and dynamic image
optimization all need a server at request time and are not in the export.
`images: { unoptimized: true }` is required for the same reason. For a
visual and content review — which is what most previews are — none of
that matters.

## Private by default

An unreleased marketing site is not something to leave on a guessable
URL. Every report is private until you change it: team, email-domain
gate, named reviewers, or a
[password-protected link](/password-protect-html-report) for a client.
See the [sharing model](/docs/sharing).

## Feedback lands on the page

- **Anchored threads** on the headline, the image, the pricing row — see
  [commenting on HTML](/comment-on-html).
- **Revisions.** Rebuild and PATCH the same report id; the reviewer sees
  the new build at the URL they already have.
- **An agent can read the comments back** through [MCP](/docs/mcp) when
  the person making the edits is Claude Code.

## Limits

- **Entry HTML: 5 MB.** Assets: 25 MB per file, **250 MB and 500 files
  total** — a large app with a page per route plus per-route JS chunks
  can pass 500 files. Export a section when the point is review.
- **60 requests/minute per token.**

## Try it

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

**[Create your first report →](https://commareports.com/)**

### Related

- [Nuxt static sites](/share-nuxt-static-site) · [Gatsby builds](/share-gatsby-site)
- [Astro](/share-astro-site) · [Hugo](/share-hugo-site) · [Eleventy](/share-eleventy-site)
- [Share with a client](/share-html-file-with-client) · [Publish from CI](/docs/ci)
