Compiling ES6 and VUE JS not working in IE 11 Compiling ES6 and VUE JS not working in IE 11 vue.js vue.js

Compiling ES6 and VUE JS not working in IE 11


As already mentioned, IE11 doesn't support ES6. Looking at the line of code that throws that error you'll quickly find ES6 features (arrow functions for example).

Polyfilling will not provide you with the ability to use ES6, the only thing you can do is configure babel to target ES5 instead.

You can do that by editing your babelrc (for Babel 7):

{  "presets": [    [      "@vue/app",      {        "targets": {          "ie": "11"        }      }    ]  ]}

If you're still using Babel 6, according to the github docs you should be able to use it like so:

{  "presets": [    ["env", {      "targets": {        // The % refers to the global coverage of users from browserslist        "browsers": [ ">0.25%"]      }    }],    "vue"  ]}