globalThis is not defined 解决方案
globalThis is not defined 解决方案
·
前端提示报错 导致空白页 页面无法加载 本地测试环境都是好的 发布到现网环境出不来
查看文章 增加解决办法
还有的说:node升级到支持globalThis的版本(v12或更高版本)
aap.vue 中添加
<script>
!(function (t) {
function e() {
var e = this || self;
(e.globalThis = e), delete t.prototype._T_;
}
"object" != typeof globalThis &&
(this
? e()
: (t.defineProperty(t.prototype, "_T_", {
configurable: !0,
get: e,
}),
_T_));
})(Object);
</script>
发生问题的页面 也同时加了一下 完美解决
更多推荐
已为社区贡献3条内容
所有评论(0)