0

As I understand Browserlist tool is automatically adds needed polyfills if older browser support required. I'm trying to run ES6 js code in old Android Chrome Webview v.30 but got error:

Uncaught ReferenceError: Map is not defined", source: http://localhost/js/chunk-vendors.ed003893.js

My .browserslistrc set to:

Chrome > 20

Running npx browserslist shows that in includes chrome from 21 version and above. But after building production and running in WebView I got the same error that Map is not defined. Do I need manually add ES6 polyfill?

P.s. I'm using Vuejs 2

Eazy
  • 3,212
  • 5
  • 24
  • 40

1 Answers1

0

Found solution by adding es.map polyfill to babel.config.js file:

  presets: [
    ['@vue/cli-plugin-babel/preset', {
      polyfills: [
        'es.map',
      ],
    }],
  ],
}```

Eazy
  • 3,212
  • 5
  • 24
  • 40