socket.io-client 导致 ie11 呈现空白 [英] socket.io-client causes ie11 to render blank

查看:45
本文介绍了socket.io-client 导致 ie11 呈现空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 vue-cli 应用程序,它使用 socket.io-client 与套接字服务器通信.该实现适用于除 Internet Explorer 11 之外的所有浏览器.IE11 仅呈现一个完全空白的白页.当我注释掉 import io from 'socket.io-client 时,IE 11 呈现良好.这让我觉得我缺少某种 babel pollyfill.我检查了github repo:https://www.npmjs.com/package/socket.io-client 看起来他们已经在使用 promise pollyfill.此外,vue 默认将@vue/app"作为预设,所以我不确定发生了什么.

I have a vue-cli app that is using socket.io-client to communicate to a socket server. The implementation works on all browsers but Internet Explorer 11. IE11 just renders an entirely blank white page. When I comment out import io from 'socket.io-client, IE 11 renders fine. This leads me to think that I'm missing some kind of babel pollyfill. I checked the github repo: https://www.npmjs.com/package/socket.io-client and it looks like they're already using a promise pollyfill. Also vue has '@vue/app' as a preset by default, so I'm not sure what's going on.

我正在使用socket.io-client":^2.3.0",

I am using "socket.io-client": "^2.3.0",

推荐答案

@Steven B.他链接的问题实际上是 IE11 呈现空白屏幕的原因.

@Steven B. was spot on. His linked issue was in fact the reason why IE11 was rendering a blank screen.

我恢复到 v2.2.0,它可以在 IE11 中运行.

I reverted back to v2.2.0 and it's working in IE11.

https://github.com/socketio/socket.io-client/issues/1328

这篇关于socket.io-client 导致 ie11 呈现空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆