Transform ESM to Common JS for present NodeJS, without any junk wrappers or useless renaming.
const esm2cjs = require('esm-cjs');
const input = `import { bar } from 'foo';`;
const output = esm2cjs(input);
// const { bar } = require('foo');
ej --help
ej ./**/*.js --write
- Aggregating modules