Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/mgechev/is-esm

🌳 CLI tool which checks if a package is distributed in ECMAScript module format. Helps you reason if the package is tree-shakable.
https://github.com/mgechev/is-esm

cli esm performance tree-shaking

Last synced: about 2 months ago
JSON representation

🌳 CLI tool which checks if a package is distributed in ECMAScript module format. Helps you reason if the package is tree-shakable.

Lists

README

        

# `is-esm`



This package tells you if an npm module uses ECMAScript modules or not.

## Why do I need to know?

ECMAScript modules are statically analyzable. This helps bundlers and JavaScript optimizers to get rid of the unused exports and ultimately make your bundles smaller.

You can read more about this [here](https://web.dev/commonjs-larger-bundles/).

## How to use it?

To use `is-esm`:

```bash
$ npx is-esm @angular/core 8.0.0
$ ✔ Yes
```

```bash
$ npx is-esm moment
$ ✖ No
```

## License

MIT