View any static site from a zip file — entirely in the browser, no server needed.
Available at viewer.vitest.dev.
A service worker intercepts fetch requests and serves files from the unzipped content via Cache API. The viewer is generic — it doesn't know or care what's inside the zip. Works with Vitest HTML reports, Storybook builds, VitePress sites, or any static site.
# development
pnpm i
pnpm dev
# deploy production
pnpm releaseThen drag-and-drop a zip file onto the page. If the zip contains an index.html, it loads automatically. Otherwise, a directory listing is shown.
index.html— drop zone UI, unzips with fflate (CDN), stores files in Cache API, registers service worker, loads content in iframesw.js— intercepts fetch under/zipview/site/, serves from Cache API, generates directory listings when noindex.htmlis found
That's it. Two files, no build step, no dependencies to install.
CI produces static site artifacts (e.g. Vitest HTML reports via --reporter=html). On GitHub Actions, viewing them requires: download zip → unzip → run local static server → open browser.
GitLab CI can preview HTML artifacts directly in the browser (powered by GitLab Pages). GitHub Actions does not.
Inspired by Playwright's trace viewer which uses the same service worker + zip pattern, but for Playwright-specific trace data rather than generic static sites.
- trace.playwright.dev — SW +
@zip.js/zip.js, URL-based loading of trace zips - client-side-zip-server — generic SW-based zip serving