Home > Blockchain >  Is it possible to use VueJs 3 in an ES5 only environment via a CDN?
Is it possible to use VueJs 3 in an ES5 only environment via a CDN?

Time:03-26

I understand that pretty much all modern browser support ES6 JavaScript natively at this point. And most desktop and mobile browser auto update to the latest version automatically so there is fairly broad ES6 support now.

However, as best I can tell, some android tablets don't make it easy to upgrade the tablet OS or browser and often only support ES5 JavaScript.

Because of this we require that all website code be ES5. We are currently using VueJs 2.x and use it from a CDN with our ES5 code. And that's been working great even on really old tablets.

We are considering upgrading to VueJS 3.x however it's unclear whether VueJs 3 is available from a CDN as ES5 code. When I looked in this file: https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.js I see that it uses the const keyword and uses => so it's clearly ES6 code.

So that leaves me wondering if there is a different CDN file for those of us that still want to support older tables with their older browsers.

More specifically: Is it possible to use VueJs 3 in an ES5 only environment via a CDN?

CodePudding user response:

No

Vue3 relies on Proxy for handling reactivity. Even if you can get around some functionalities, adjusting the core code to use Proxies is a non-trivial endeavor, and is, AFAIK, the main reason that Vue3 does and will not support IE11.

You will either need to continue using Vue2, or alternatives like Svelte that can generate ES5 bundles.

  • Related