Reputation: 1089
IE11 does not load my VueJS app.
I currently have a console log error: SCRIPT1003: Expected ':' on the below line async:
methods: {
async getData() {
I have tested using a polyfill but with no improvement, what am I missing?
Thanks
Upvotes: 1
Views: 1674
Reputation: 8375
I have tested using a polyfill but with no improvement, what am I missing?
The async await
syntax is part of the ES2017 spec and not supported in Internet Explorer at all - alongside of many other features such as arrow functions and classes.
As mentioned in some of the comments, the only workaround here is to use a transpiler such as babel to transpile modern language features down to ES5, which is fully supported by IE11.
I highly recommend using vue-cli to kickstart your projects, as it comes with all the build setup you need to make your application work cross-browser and many more features, such as intelligent code splitting.
Upvotes: 2