Checking to see if an npm package is tree shake-able (is-esm)


Sometimes on a project I need to know if an npm package is tree shake-able. The is-esm utility checks to see if the package contains a distribution with ECMAScript module and outputs.

To run it: `npx is-esm PACKAGE_NAME`

ex: `npx is-esm @angular/core`

Minko Gechev originally posted this method on Twitter. At least that is where I found it. 🙂 I’m posting it here so I know where I can look for this method later.

,

Leave a Reply