Skip to content

How to find unused package exports

In a monorepo

  1. Add the check-exports script in the package.json of the package that needs to be checked
"scripts": {
"check-exports": "pure-index"
}
  1. Run
Terminal window
npm run check-exports
  1. Depending on the project, you may need to configure Pure Index.

In different repositories

  1. Use the findUnusedExports function from JavaScript API.