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

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

Awesome Lists containing this project

README

          

esm-dep-check
=============
[![Build Status](https://travis-ci.org/amilajack/esm-dep-check.svg?branch=master)](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,
// }
// ]
```