code: function requireFunc() {
      if (typeof arguments[0] === 'string') {
        const dep = arguments[0];
        const got = defined(dep);
        if (got) return got.val;
        throw new Error(`commonjs dependency "${dep}" is not prepared.`);
      }
  
      return requirejs.apply(null, arguments);
    }
docs: return AMD require function or commonjs require function