Skip to content

extractPackageUsage

extractPackageUsage(graph, storyFiles, packages): PackageUsage[]

Defined in: usage.ts:103

Find which tracked dependency packages each story reaches through its import graph. Traversal stops at a package boundary (its internals are not walked) and records only the shallowest module per package, so a story yields at most one row per package.

DepGraph

Bidirectional module graph from the build’s stats file.

readonly string[]

Story import paths from the Storybook index.

Record<string, TrackedPackage>

Packages to track (e.g. the project’s declared dependencies).

PackageUsage[]