npm.io
0.19.2 • Published 2 months ago

@chialab/cjs-to-esm

Licence
MIT
Version
0.19.2
Deps
1
Size
21 kB
Vulns
0
Weekly
0
Stars
183

CommonJS to ESM

A commonjs to esm converter, inspired by WMR.

NPM

Install

npm i @chialab/cjs-to-esm -D
yarn add @chialab/cjs-to-esm -D
pnpm 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.

Keywords