How to find unused package exports
In a monorepo
- Add the
check-exportsscript in thepackage.jsonof the package that needs to be checked
"scripts": { "check-exports": "pure-index"}- Run
npm run check-exports- Depending on the project, you may need to configure Pure Index.
In different repositories
- Use the findUnusedExports function from JavaScript API.