微信小程序解包之后,在微信開發(fā)者工具當中點開調(diào)試器,選擇Console選項卡,發(fā)現(xiàn)左側(cè)的預覽界面是空白的,雖然真機調(diào)試可以有顯示,但是真機預覽也是跟左邊的界面一樣都是空白。之后發(fā)現(xiàn)Console里面顯示
解決方法: 修改一下 @babel\runtime\helpers\typeof.js 整個代碼替換掉
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;
替換之后重新編譯如果還有報錯:_typeof4 is not a function
解決方法:右上角點擊“詳情”=>“本地設置”=>“將JS編譯成ES5”=>取消勾選
文章來源:http://www.zghlxwxcb.cn/news/detail-532837.html
感謝大佬: https://blog.csdn.net/weixin_39114917/article/details/131031788文章來源地址http://www.zghlxwxcb.cn/news/detail-532837.html
到了這里,關于微信小程序反編譯之后運行報錯“_typeof3 is not a function”的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!