# Share a Rollup Visualizer Report — Bundle Size on a Link (Vite Too)

Canonical: https://commareports.com/share-rollup-visualizer-report
Published: 2026-09-01

> rollup-plugin-visualizer writes stats.html — an interactive treemap of your Rollup or Vite bundle. Publish it to Comma for one URL per app, threads on individual modules, and a size history.

# Share a Rollup visualizer report

Bundle size arguments are won with a treemap and lost with a number.
"The bundle grew 80 KB" invites a shrug. A treemap where one rectangle is
visibly a date library you imported for one `format` call ends the
conversation in about four seconds.

`rollup-plugin-visualizer` produces that treemap as a single
self-contained `stats.html` — and then it sits in your build output,
where the person who needs to see it cannot.

## Publish it

```ts
// vite.config.ts (or rollup.config.js)
import { visualizer } from "rollup-plugin-visualizer";

export default {
  plugins: [visualizer({ filename: "stats.html", gzipSize: true })],
};
```

```bash
npm run build

curl -fsS -X PATCH \
  "https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html stats.html \
        --arg title "Bundle — $APP — $(git rev-parse --short HEAD)" \
        '{title: $title, html: $html}')"
```

Or drag `stats.html` into [the app](https://commareports.com/).

The treemap stays interactive at the link — scripts run inside a
sandboxed iframe (`allow-scripts`, no `allow-same-origin`).

## What the URL changes

- **The reviewer sees the rectangle.** Threads anchor to the chunk, so
  "this is the moment locale bundle, we only need `en`" lands on it. See
  [commenting on HTML](/comment-on-html).
- **A size history per app.** PATCH on every main-branch build; each
  revision keeps its own treemap. See
  [revisions and diffs](/share-html-report).
- **PR reviews get a link, not a screenshot.** Post it from CI — see
  [GitHub Actions](/ci/github-actions-html-report).
- **Private by default** — a treemap names every dependency you ship.

## Limits

- **HTML body: 5 MB.** `stats.html` for a very large app with
  `sourcemap: true` can approach it; the `treemap` template is the
  compact one.
- **Scripts run, sandboxed**: `allow-scripts`, no `allow-same-origin`.
- **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

- [Webpack bundle analyzer](/share-bundle-analyzer-report) — the webpack equivalent
- [Source map explorer](/share-source-map-explorer-report) · [Lighthouse](/share-lighthouse-report)
- [Unlighthouse](/share-unlighthouse-report) · [Publish from CI](/docs/ci)
