probil/vue-socket.io-extended

IE 兼容性问题 (IE compatible issues)

ruchenshanghai opened this issue · 2 comments

按照说明添加包后遇到如下问题(set up a minimum project and find this error in Internet Explorer):
strict 模式下不允许对“slice”调用 Delete
eval code (1181) (85,7)
image
点击后跳转
image

@ruchenshanghai sorry I don't speak Chinese.

Could you please provide some minimal repo / codesandbox reproducing the issue?
What is your version of IE?
Which version of socket.io you are using?

FYI We support only v11. Microsoft will stop supporting it in 6 months

@ruchenshanghai I've just managed to make twitter feed demo run in IE 11 without any changes in the code.

Since you haven't provided any extra details I don't know exactly why it fails for you.

Some possible reasons are:

  1. You are using dev mode (e.g. npm run serve) to run the app. Dev mode is simplified and focused on start time and HMR performance thus some steps are skipped. E.g. JS minifications, polyfills, etc. Vue developers assume you'd use evergreen browser for local development. Therefore you need to build the app and serve it to make sure it actually works in IE (e.g. npm run build && cd dist && npx serve -s)
  2. browserslist doesn't cover IE version you want to support. Run npx browserslist to get a list of the browsers currently supported and make use your IE version is there otherwise update .browserslist file or browserslist config in package.json
  3. Some dependencies are not transpiled - pass them to appropriate config in vue.config.js:
    https://cli.vuejs.org/config/#transpiledependencies
module.exports = {
   transpileDependencies: ['library-name']
}

Anyway I suggest you to stop supporting IE11 - it's an old browser and using it slows down progress. Just discovered that IE11 dropped below 0.5% of my country. Moreover, Vue 3 most likely won't support IE11