@putout/plugin-convert-esm-to-commonjs
v6.0.2
Published
šPutout plugin adds ability to convert ecma script module to commonjs
Maintainers
Readme
@putout/plugin-convert-esm-to-commonjs 
EcmaScript module syntax is the standard way to import and export values between files in JavaScript. The
importstatement can be used to reference a value exposed by theexportstatement in another file.CommonJS is a module system supported in Node, it provides a
requirefunction, which can be used to access theexportsobject 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-commonjsRule
{
"rules": {
"convert-esm-to-commonjs": "on"
}
}ā Example of incorrect code
import hello from 'world';ā Example of correct code
const hello = require('world');License
MIT
