在 IE11 中使用 Vue 3 [英] Using Vue 3 in IE11

查看:83
本文介绍了在 IE11 中使用 Vue 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多线程涵盖了 Vue 2 对 IE11 的支持,我知道它与 polyfills 一起工作得很好.但是可以在 IE11 中使用 Vue 3 吗?如果没有,是否计划支持?

I know there are a lot of threads covering Vue 2 support for IE11, which I know works fine with polyfills. But is it possible to use Vue 3 in IE11? If not, is it planned to be supported?

我尝试使用 Vue CLI @vue/cli 4.5.8,它当前安装了 vue@3.0.2(以及 Vuex、Router 和 Typescript 支持).在我的 vue.config.js 中使用 transpileDependencies: ['vue-router'] 后,我设法让它在 Edge 中工作.IE11 一直在抱怨vue"npm 包.在对它进行转译之后,我也得到了 在严格模式下不允许访问函数或参数对象的调用者"属性,这是我目前遇到的问题.

I tried using Vue CLI @vue/cli 4.5.8, which currently installs vue@3.0.2 (along with Vuex, Router and Typescript support). After using transpileDependencies: ['vue-router'] in my vue.config.js I managed to get it working in Edge. IE11 kept complaining about the "vue" npm package. After transpiling it too I got Accessing the 'caller' property of a function or arguments object is not allowed in strict mode which I'm currently stuck with.

我也尝试过 babel polyfills 和 vue 2 提到的其他技术,但没有成功.

I've also tried babel polyfills and the other techniques mentioned for vue 2 without success.

推荐答案

Vue 3 正在使用 JS 代理 用于反应性,在 任何版本 IE 中都不支持(请参阅我的链接 - 滚动底部)

Vue 3 is using JS proxies for reactivity, which is not supported in any version of IE (see my link - scroll bottom)

兼容性"构建(与 Vue 2 具有相同的反应系统......与 IE11 兼容)过去曾被承诺过,似乎 它即将很快"(甚至 MS 已宣布终止对 IE 的支持)但我想它没有高优先级的自动取款机...

"Compatibility" build (with same reactivity system as Vue 2 ...compatible with IE11) was promised in the past and it seems it's coming "soon" (even MS has announced IE end of support) but has no high priority atm I suppose...

v3.0.0 One Piece 发行说明:迁移和 IE11 支持:由于时间限制,我们已推迟迁移构建(v3 构建与 v2 兼容行为 + 迁移警告)和 IE11 构建,并计划在 2020 年第四季度重点关注它们.因此,用户计划要迁移现有的 v2 应用程序或需要 IE11 支持,此时应了解这些限制.

您可以尝试一些 ES6 Proxy pollyfils 或等待 Vue 3兼容构建...

You can try some ES6 Proxy pollyfils or just wait for Vue 3 compat build...

在最近的 Vue 阿姆斯特丹 2021 年 Vuenion 现状演讲 Vue 的创建者和首席开发人员 Evan You 承认他们正在重新考虑对旧版浏览器的支持"

In a recent State of the Vuenion 2021 talk for Vue Amsterdam Evan You, the creator and lead developer of Vue, acknowledged that they are "rethinking legacy browser support"

你可以自己看,但我从中得到的是,他们看到需要做多少工作才能使生态系统的其余部分与 Vue 3(路由器/Vuex/Dev Tools/DX - 开发经验)一致) 并且他们怀疑(顺便说一句,我同意这一点)当我们让 Vue 2 在 IE 11 中完美运行并且 IE 11 对大多数用户来说实际上已经死了时,使 Vue 3 与 IE11 兼容的努力是值得的......

Feel free to watch it yourself but what I take from it is that they see how much work is needed to bring up the rest of the ecosystem in-line with Vue 3 (Router/Vuex/Dev Tools/DX - dev experience) and they are in doubt (and I agree with that btw) the effort to make Vue 3 compatible with IE11 is worth it when we have Vue 2 perfectly working in IE 11 and IE 11 is practically dead for most of the users...

这符合为 @vue/composition-apiVue 2 更好,并努力为库作者创建指南和文档,以便他们可以创建适用于 Vue 2 和 3 的 Composition API 库

This comes in line with the effort to make a @vue/composition-api for Vue 2 better and effort to create a guidance and documentation for library authors so they can create a Composition API libraries working in both Vue 2 and 3

这是暂定的,如果没有公开讨论和社区的反馈,将不会做出决定.所以如果你有兴趣,Vue RFCs repo

This is tentative and will not be decided without public discussion and feedback from community. So if you are interested, there should be a new RFC soon ready for your feedback in Vue RFCs repo

RFC 现已发布并开放讨论

这篇关于在 IE11 中使用 Vue 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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