babel/generator-babel-plugin

Need commonjs export patch for build

hax opened this issue · 0 comments

hax commented

Babel 6.x do not transform export default to module.exports, and most babel presets are written in commonjs which do not compatible with exports.default.

Solution:
Change "build": "babel src -d lib" to "build": "babel src -d lib && echo \"\nmodule.exports = exports['default'];\" >> lib/index.js"