Skip to content
/ esm-cjs Public

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

License

Notifications You must be signed in to change notification settings

noyobo/esm-cjs

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published