Babel is annoying.
When exporting functions using ES7 syntax
export default function(){} in A.js
and then requiring it in index.js file to be exported
module.exports.A = require("./a"), in index.js
an object is returned so..
module.exports.A = {default: function(){}}. in index.js
If this is in a module, however, we need module.exports.A to be that function, so the way around it is:
module.exports.A = require("./a").default
lol