Vue 3 CLI - How to add babel polyfill for Object.entries

家住魔仙堡 提交于 2019-12-05 07:01:55

You need to change es6.object to es7.object.entries to make Object.entries work on older browsers.

So your /babel.config.js should look like the following:

module.exports = {
  presets: [
    [
      "@vue/app",
      {
        polyfills: ["es7.object.entries"]
      }
    ]
  ]
};

I have found the polyfills name here: built-in-features.js#L153

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!