0.1.2 • Published 2 years ago

esm-cjs v0.1.2

Weekly downloads
6
License
MIT
Repository
github
Last release
2 years ago

esm-cjs

npm.io Codecov npm package NPM downloads

Transform ESM to Common JS for present NodeJS, without any junk wrappers or useless renaming.

Usage

const esm2cjs = require('esm-cjs');

const input = `import { bar } from 'foo';`;

const output = esm2cjs(input);

// const { bar }  = require('foo');

Command line

ej --help
ej ./**/*.js --write

TODO

  • Aggregating modules