esm-cjs
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