1

I have a vue-cli 3 app created, and seeing some error messages logged about some JS methods not existing in some browsers.

One error is that AbortController is not defined.

My questions are:

  1. Was my assumption correct that the default vue-cli webpack configuration would add polyfills for these features, such as fetch, or const keywords?

  2. Assuming there are some features which aren't polyfilled by default, how can I add a specific one, like AbortController or fetch?

                    **.browserslistrc**
> 1%
last 2 versions
not ie <= 8
                    **vue.config.js**
module.exports = {
    pwa: {...}
}
d-_-b
  • 21,536
  • 40
  • 150
  • 256
  • 1
    The [docs](https://cli.vuejs.org/guide/browser-compatibility.html#polyfills) go over how they suggest adding polyfills. – Steven B. May 06 '19 at 16:50
  • 1
    You may find the answer to [this question](https://stackoverflow.com/questions/52452501) helpful. – David Weldon May 06 '19 at 16:53
  • For myself, I had to add `transpileDependencies` option in `vue.config.js` for a dependency I was using as per the link by @StevenB. – logee May 07 '19 at 01:00

0 Answers0