微信小程序 uniapp 反编译 真机调试报错 _typeof3 is not a function. (In '_typeof3(Symbol.iterato

69 阅读1分钟

微信小程序 uniapp 反编译 真机调试报错 _typeof3 is not a function. (In '_typeof3(Symbol.iterator)', '_typeof3' is an instance of Object) 在这里插入图片描述 解决方法有两种:

  1. 修改一下 @babel/runtime/helpers/typeof.js 文件,内容修改为代码片段的。目的是添加"@babel/helpers - typeof";这一句在代码中,让babel识别出这是一个特殊的helper文件,不对它进行处理。
  2. 参考配置说明 developers.weixin.qq.com/miniprogram… 修改一下 babelSetting 的 outputPath 成其他路径。

image.png

function _typeof2(o) {
  "@babel/helpers - typeof";
  return (_typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
      return typeof o;
  } : function(o) {
      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  })(o);
}
•
•
function _typeof(o) {
  return "function" == typeof Symbol && "symbol" === _typeof2(Symbol.iterator) ? module.exports = _typeof = function(o) {
      return _typeof2(o);
  } : module.exports = _typeof = function(o) {
      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : _typeof2(o);
  }, _typeof(o);
}
•
•
module.exports = _typeof;

修改完后正常启动了 在这里插入图片描述

来源: developers.weixin.qq.com/community/m…