Skip to content

feat(reporter): support html reporter single file output#10029

Draft
hi-ogawa wants to merge 1 commit intovitest-dev:mainfrom
hi-ogawa:feat-reporter-support-html-reporter-single-file-output
Draft

feat(reporter): support html reporter single file output#10029
hi-ogawa wants to merge 1 commit intovitest-dev:mainfrom
hi-ogawa:feat-reporter-support-html-reporter-single-file-output

Conversation

@hi-ogawa
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa commented Mar 31, 2026

Description

I was hoping the same service worker trick as https://github.com/vitest-dev/viewer might work, but it requires at least two index.html and sw.js. So manual assets/data inlining logic needs to live inside html reporter itself.

It should be doable but we need a few independent new logic, namely:

  • inlining SPA
  • inlining html.meta.json.gz
  • inlining attachments from path to body
  • inlining MPA (for coverage iframe) (this will be a separate follow-up)
    • actually coverage spa reporter should make this simpler

Interestingly, the logic required for SPA and MPA inlining are specfic to Vitest html report, so I might look for existing tools or just vibe-code from scratch.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 31, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ca3d470
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69cb218d5d470e0008e44e92
😎 Deploy Preview https://deploy-preview-10029--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to save report in a single combined HTML file

1 participant