首页 > 技术文章 > Vuex IE浏览器运行报错

ljbkyBlog 2017-07-26 11:19 原文

Vuex requires a Promise polyfill in this browser

 

因为使用了ES6 Promise,而IE浏览器不支持 

解决方法:

使用:babel-polyfill  

  npm install --save-dev babel-polyfill  

 如果使用vue-cli 及webpack,在webpack.config.js中加入:

  entry: {app: ['babel-polyfill', './src/main.js']}

 

 

Vuex requires a Promise polyfill in this browser :http://www.jianshu.com/p/3e3b171179f8

使用 ES6 的浏览器兼容性问题:https://segmentfault.com/a/1190000005128101

推荐阅读