tree-shakers are good at finding unused code in a module, but they can allow you to have a whole unused file somewhere in your project.
This script follows the require graph, and compares it to the
ls output, to find any files that are potentially not being used.
npm install -g unrequired
or from a node script:
It uses rollup ⭐️
JSX, and other variants are not currently supported.
It atleast attempts to support
.mjs files, and some other things.
it won't catch any unrequired