{"library":"babel-plugin-transform-commonjs","type":"library","category":null,"description":"A Babel 7 plugin that transforms CommonJS modules (require, module.exports, exports) into ES modules (import/export). Version 1.1.6 is the latest stable release. It aims to produce spec-compliant ESM code and throws on unsupported patterns like non-static require or require.extensions. It offers escape hatches (synchronousImport, exportsOnly) for controlled conversion. Unlike @babel/plugin-transform-modules-commonjs (which targets the opposite direction), this plugin converts CJS to ESM and is mainly used for building ESM-compatible bundles or migration.","language":"javascript","status":"active","version":"1.1.6","tags":["javascript","babel","transform","plugin","commonjs","modules","esm"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-transform-commonjs","imports":["import plugin from 'babel-plugin-transform-commonjs'","{ plugins: ['transform-commonjs'] }","{ plugins: [['transform-commonjs', { synchronousImport: true, exportsOnly: true }]] }"]},{"cmd":"yarn add babel-plugin-transform-commonjs","imports":[]},{"cmd":"pnpm add babel-plugin-transform-commonjs","imports":[]}],"homepage":null,"github":"https://github.com/tbranyen/babel-plugin-transform-commonjs","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-transform-commonjs","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-transform-commonjs/compatibility"}}