6.0.2 β’ Published 6 months ago
@putout/plugin-convert-esm-to-commonjs v6.0.2
@putout/plugin-convert-esm-to-commonjs
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 theexport
statement in another file.CommonJS is a module system supported in Node, it provides a
require
function, which can be used to access theexports
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