Simplifies compiled CommonJS exports when working with node.
$ npm install babel-plugin-node-exports
.babelrc
{
"plugins": ["babel-plugin-node-exports"]
}
$ babel --plugins node-exports script.js
require('babel').transform('code', {
plugins: ['node-exports']
});
import goat from 'barn';
goat();
to:
var _barn = require('barn');
(0, _barn)();
(blame babel for redundant (0, ...)
If you need any other help, don't hesitate to leave an issue