// the find
Rich-Harris/agadoo
Check whether a package is tree-shakeable
A tiny CLI from Rich Harris (Svelte/Rollup) that bundles your package with Rollup and checks whether unused exports actually get eliminated. It's meant to run as a pre-publish check for library authors shipping ES modules, not something end users of a library would ever touch.
Does one thing and stops: bundle with Rollup, run the result, count console output lines against an expected value to confirm dead code was dropped. Drops straight into a prepublishOnly script so a broken build fails CI instead of shipping silently. Test fixtures (test/pass, test/fail/side-effect) make the pass/fail logic easy to verify and extend.
Only tells you pass or fail — when it fails you're on your own figuring out which export or side effect broke tree-shaking, which the README admits outright. It's Rollup's opinion of tree-shakeability, not webpack's or esbuild's, so a green result here doesn't guarantee your library shakes cleanly under every bundler your users pick. No commits since September 2024 and only 16 forks, so if Rollup's internals shift in a way that changes shaking behavior, don't expect a fix landing fast.