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?
I tried using Vue CLI @vue/cli 4.5.8
, which currently installs [email protected]
(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.
I've also tried babel polyfills and the other techniques mentioned for vue 2 without success.
Vue 2's reactivity system is based on ES5 getter/setters. Vue 3 leverages ES2015 Proxies for a more performant and complete reactivity system, which cannot be polyfilled in IE11.
The main reason why your Vue app is breaking in IE11 is because the browser does not support modern JavaScript syntax. By that I mean ES2015 and beyond. The Internet Explorer browser was deprecated in favour of Microsoft's more modern Edge browser.
You can start your new production projects with Vue 3 - the core and subprojects are ready to use. Keep in mind that the ecosystem is still evolving, so some open-source components may not yet available in Vue 3 versions.
The short answer is: Yes. Vuex is the preferred state management solution for Vue apps, and Vuex 4 is the version compatible with Vue 3. Do take note, however, that using Vuex for state management depends on the complexity of your application.
Vue 3 is using JS proxies for reactivity, which is not supported in any version of IE (see my link - scroll bottom)
"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
release notes:
Migration and IE11 Support: We have pushed back the migration build (v3 build with v2 compatible behavior + migration warnings) and the IE11 build due to time constraints, and are aiming to focus on them in Q4 2020. Therefore, users planning to migrate an existing v2 app or require IE11 support should be aware of these limitations at this time.
You can try some ES6 Proxy pollyfils or just wait for Vue 3 compat build...
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"
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...
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
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 is now posted and open for discussion
There will not be a version of Vue 3 for IE 11. If you need to support IE 11, use Vue 2....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With