CommonJS to ESM • A commonjs to esm converter, inspired by WMR.
Install
npm i @chialab/cjs-to-esm -D
yarn add @chialab/cjs-to-esm -D
Usage
import { transform } from '@chialab/cjs-to-esm';
const { code, map } = transform('require("tslib"); module.exports = function() {}');
License
CommonJS to ESM is released under the MIT license.