Find the dominator tree of your npm dependencies.
run npm list --json
in your project folder. (consider adding --depth=n
and --omit=dev
)
paste the output below.
The dominator tree is useful because of this nice property: if you remove a node in the dominator tree, the entire subtree beneath it is no longer reachable from the root. It means if a node has a big number of descendants, it’s a good candidate for cutting down the dependency tree.
Here’s the example output for @babel/[email protected]