esm-cjs

0.1.2 • Public • Published

esm-cjs

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

Readme

Keywords

none

Package Sidebar

Install

npm i esm-cjs

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

9.96 kB

Total Files

7

Last publish

Collaborators

  • noyobo