babel-plugin-transform-exports

1.1.0 • Public • Published

babel-plugin-transform-exports

A babel plugin to turn ES5 exports or module.exports call to ES6/7

Install

npm install --save-dev babel-plugin-transform-exports

Usage

Note: For using this package as standalone, you must install babel-cli using npm i --save-dev babel-cli
import {transform} from 'babel-core';
import transformExports from 'babel-plugin-transform-exports';
 
const codeES5 = 'module.exports = 123';
const codeES6 = transform(codeES5, {
  plugins: [transformExports]
}).code
 
// codeES5 => 'module.exports = 123';
// codeES6 => 'export default 123';
 

Contributing

In case of bug or feature request, feel free to file an issue.

Package Sidebar

Install

npm i babel-plugin-transform-exports

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

13.8 kB

Total Files

7

Last publish

Collaborators

  • rajatvijay