#9763·vitest

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

bash
na

Used Package Manager

npm

Validations