code: function thinkrequire(file) {
      try {
          let obj = require(file);
          obj = (obj && obj.__esModule && obj.default) ? obj.default : obj;
          if (lodash.isFunction(obj)) {
              obj.prototype.__filename = file;
          }
          return obj;
      } catch (e) {
          throw Error(e);
      }
  }
docs: define(lib, 'defer', lib.getDefer); 
  Support for babel compiled es6 module require
  
  @param {string} file
  @returns {*}