JSPM

ghostcomponents

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q15070F
  • License MIT

CLI that can help you to find unused components in your ReactJS project

Package Exports

  • ghostcomponents
  • ghostcomponents/dist/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ghostcomponents) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GhostComponents

  • GhostComponents it's NodeJS CLI that can help you to find all React Components non-used in your app Tree Components.

Support

  • Project created by create-react-app or any from scratch configuration.
  • We don't support projects that use different syntax for importing components, like NextJS. we working on that for the next release/patches.

Installation

  npm install -g ghostcomponents

How to use it

  • if your entry point does not contain ReactDOM.render(), use -rc ROOT_COMPONENT_NAME as option to the CLI
  foo@bar:~$ ghostcomponents -r YOUR_ROOT_PROJECT -e PATH_ENTRY_POINT
  foo@bar:~$ ghostcomponents -r YOUR_ROOT_PROJECT -e PATH_ENTRY_POINT -rc ROOT_COMPONENT_NAME