Optimize html reporter module graph data
Author: hi-ogawaCreated Mar 2, 2026Updated Oct 1, 2026
Labelsp3-minor-bugfeat: reporters
Describe the bug
I noticed while doing https://github.com/vitest-dev/vitest/pull/9740. Currently the module graph is constructed and saved per entry test file. However, this involves quite a lot of duplicate information since this means each test file brings the subgraph starting from itself.
In https://github.com/vitest-dev/vitest/pull/9740, this is optimized to save the full graph structure per environment and this avoids such duplicates. Html reporter should also preserve module graph data in that form, then only trim it down (traverse from per test file basis) at the view level.
Reproduction
na
System Info
naUsed Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Source: vitest-dev/vitest