将 es6-promise polyfill 导入 Vue.js

Importing the es6-promise polyfill into Vue.js

我在加载旧版本 Android 中包含 axios 的 Vue 组件时遇到问题。经过一些研究,它指出浏览器不支持 Promises,因此是 polyfill。

我已经安装并导入了 polyfill,但仍然有问题。

import Promise from 'es6-promise';

以上是否正确?或者还有其他问题?

我的 main.js 上方有以下行:

require('es6-promise').polyfill()

您可以在 vue-hackernews-2.0 here:

中看到其用途的其他变体
import 'es6-promise/auto'