4

The article is very watery, and the core is only one sentence: Due to ES5 limitations, Proxy syntax cannot be written in ES5 (Proxies cannot be transpiled or polyfilled)

background

Recently, the group had a conversation about vue 3:

BOSS: Which project of our team has used Vue 3?

Team Leader A: We used Vue 3 for the main micro-front-end project (look at that, how advanced my team is)

Leader B: Vue 3 does not support IE 11

。。。

my question

It's so cool I suddenly came to my curiosity: Why doesn't Vue 3 support IE11, compatibility issues? Wrong, compatibility issues polyfill should be able to deal with.

I want to ask in the group, but I have the lowest rank. The group of group C asked, and then group leader C
(My team leader) replied:

Not supporting IE is the result. To analyze the cause, you can't "find the cause" - generally, the random attributions are inaccurate.
To understand why, you might as well read RFC and related discussions

I suspect that he is trembling, it seems he is not.

Reasons for not supporting IE11

So I bite the bullet and read English and summarized the reasons for three reasons:

  1. Proxy is more fragrant, the Vue team wants to use
  2. The Vue team wants to contribute to the killing of IE
  3. If supported, development and maintenance costs are too high.

Vue 2 is based on ES5 getter/setters, and Vue 3 is based on Proxy. If they are implemented, they must be written logically. The Vue team does not want to make more sacrifices because of IE11. It will be too difficult for me to release a Super Proxy in the future.

What about Babel

The question is coming again. Will the problem of Proxy be over with a Babel polyfill?

Babel...I don't care about this problem

from babel

Unsupported feature
Due to the limitations of ES5, Proxies cannot be transpiled or polyfilled. See support in various JavaScript engines.

Finally, I found the root cause:

Neither Babel's transpiled nor polyfilled can support the features of Proxy. ES6 is the back wave of ES5, not a nuisance.

gained knowledge, and there are things that Babel can't handle in the JS world.

The article is very watery, and the core is only one sentence: Due to ES5 limitations, Proxy features cannot be written in ES5 syntax (Proxies cannot be transpiled or polyfilled)

You Yuxi: Vue3 is considering abandoning IE browser


亖混子
4.7k 声望2.4k 粉丝

自信、自洽、自在