code: function(path, state) {
    var defaultReexportSpecifier = path.get('specifiers')[0];
    var local = defaultReexportSpecifier.get('local').get('name').node;
    var exported = defaultReexportSpecifier.get('exported').get('name').node;
  
    if (local !== 'default') {
      throw path.buildCodeFrameError('Only named exports allowed are reexports in index.js');
    }
  
    // used by Program's exit visitor
    state.set('reexports', true);
  
    path.replaceWith(
      buildExportsAssignment(
        t.callExpression(
          t.identifier('require'),
          [t.stringLiteral(path.node.source.value)]
        ),
        exported
      )
    );
  }
docs: /*
  before
  export { default as curryN } from './curryN';
  
  after
  module.exports.curryN = require('./curryN');