6.0.2 β€’ Published 6 months ago

@putout/plugin-convert-esm-to-commonjs v6.0.2

Weekly downloads
2,664
License
MIT
Repository
github
Last release
6 months ago

@putout/plugin-convert-esm-to-commonjs NPM version

EcmaScript module syntax is the standard way to import and export values between files in JavaScript. The import statement can be used to reference a value exposed by the export statement in another file.

CommonJS is a module system supported in Node, it provides a require function, which can be used to access the exports object exposed by another file.

(c) parceljs

🐊Putout plugin adds ability to convert EcmaScript Modules to CommonJS. Use @putout/plugin-nodejs instead.

Install

npm i @putout/plugin-convert-esm-to-commonjs

Rule

{
    "rules": {
        "convert-esm-to-commonjs": "on"
    }
}

❌ Example of incorrect code

import hello from 'world';

βœ… Example of correct code

const hello = require('world');

License

MIT

6.0.1

6 months ago

6.0.2

6 months ago

6.0.0

11 months ago

5.0.0

2 years ago

4.0.0

2 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago