Share a SvelteKit build
npm run dev is a preview for exactly one person. The alternatives are a
deploy or a screenshot, and a screenshot of an app is a claim you cannot
click.
Build a static output
// svelte.config.js
import adapter from "@sveltejs/adapter-static";
export default {
kit: {
adapter: adapter({ fallback: "index.html" }),
prerender: { entries: ["*"] },
},
};
npm run build
# → build/
Opening build/index.html from the Finder shows unstyled markup: SvelteKit
references /_app/immutable/… absolutely, and a file:// origin resolves
that against your filesystem root. Same root cause as
a shared report with no CSS.
Publish build/
Drag the folder into the app, or zip and POST it:
cd build && zip -qr ../site.zip . && cd ..
curl -fsS -X POST https://commareports.com/api/v1/reports \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-F "title=Preview — $(git rev-parse --abbrev-ref HEAD)" \
-F "visibility=team" \
-F "bundle=@site.zip"
cd into build first so index.html is at the archive root —
sharing a folder of HTML files covers why.
Why a review link beats a staging deploy
- Anchored threads — design and copy feedback attaches to the element on the rendered page instead of arriving as a screenshot with an arrow on it. See commenting on HTML.
- Revisions at one URL — one report id per branch; the PR link never goes stale.
- Access per report — private, team-only, domain-gated, or an unlisted link for a client. See the sharing model.
- No environment to keep alive — no staging slot, no preview quota, no DNS.
Limits
- Assets: 25 MB per file, 250 MB and 500 files per report. Strip source maps before zipping if the file count is close.
- Entry HTML: 5 MB.
- 60 requests/minute per token.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited revision history.