https://github.com/amilajack/esm-dep-check
Check if your dependencies are using ES6 modules
https://github.com/amilajack/esm-dep-check
es6 module shake tree
Last synced: 5 months ago
JSON representation
Check if your dependencies are using ES6 modules
- Host: GitHub
- URL: https://github.com/amilajack/esm-dep-check
- Owner: amilajack
- License: mit
- Created: 2017-08-18T21:58:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-26T07:40:04.000Z (over 4 years ago)
- Last Synced: 2025-03-23T02:46:39.470Z (about 1 year ago)
- Topics: es6, module, shake, tree
- Language: JavaScript
- Size: 75.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
esm-dep-check
=============
[](https://travis-ci.org/amilajack/esm-dep-check)
A micro utility that checks which of your dependencies use the `module` or `jsnext:main` property in their `package.json`.
### What?
Any package with a `module` or `jsnext:main` in its `package.json` provides a version of that package that doesn't have its modules transpiled. This tool lists all the packages that don't have either of those properties.
### Why?
**Smaller build size and better performance**: Transpiled makes static analysis significantly more difficult. This means that dead code stripping, tree shaking, and other optimizations through static analysis will be much more difficult. This tool tells you which packages ship with
### Installation
```bash
npm install -g esm-dep-check
```
### Usage
```bash
# Shorthand alias
edc
# OR
esm-dep-check
```
### Node API
```js
import edc from 'esm-dep-check';
edc('./project/package.json')
// [
// {
// "name": "chalk",
// "supportsEsm": false,
// },
// {
// "name": "cli-table3",
// "supportsEsm": false,
// },
// {
// "name": "commander",
// "supportsEsm": false,
// }
// ]
```