Vuex requires a Promise polyfill in this browser
来源:互联网 发布:数码宝贝 网络侦探图鉴 编辑:程序博客网 时间:2024/06/05 18:55
在使用Vuex时,使用ie浏览器会出现“Vuex requires a Promise polyfill in this browser”的错误提示,这是因为使用了ES6 Promise,而IE浏览器不支持,解决方案如下:
1.安装babel-polyfill
1
npm install --save babel-polyfill
2.引入babel-polyfill
在webpack.config.js中增加(如果使用的是vue-cli+vue webpack模板则在webpack.base.conf.js中增加):
12
require("babel-polyfill"); //es5//import "babel-polyfill"; //es6
3.使用babel-polyfill
将webpack.config.js(如果使用的是vue-cli+vue webpack模板则是webpack.base.conf.js)文件中的
12345
module.exports = {entry: {app: './src/main.js'}……
修改为
12345
module.exports = {entry: {app: ['babel-polyfill', './src/main.js']}……
完成
阅读全文
0 0
- vuex requires a Promise polyfill in this browser
- Vuex requires a Promise polyfill in this browser
- VUE 报 Error: [vuex] vuex requires a Promise polyfill in this browser.
- IE报vuex requires a Promise polyfill in this browser问题解决
- IE报vuex requires a Promise polyfill in this browser问题解决
- IE报vuex requires a Promise polyfill in this browser问题解决
- 解决“requires a Promise polyfill in this browser”错误
- 解决“requires a Promise polyfill in this browser”错误
- vue.js之路(5)——解决vuex requires a Promise polyfill in this browser问题
- 实现一个Promise-polyfill
- java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection
- java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection
- A Markdown implement in browser
- this android sdk requires a...adt
- The goal you specified requires a project to execute but there is no POM in this directory
- The goal you specified requires a project to execute but there is no POM in this directory
- [ERROR] The goal you specified requires a project to execute but there is no POM in this directory
- The goal you specified requires a project to execute but there is no POM in this directory...
- leetcode 208. Implement Trie (Prefix Tree)
- 简单 12 步理解 Python 装饰器
- 以太网的最大和最小帧长是怎样计算的
- 解决emoji插入不到数据库的问题
- 去掉TabLayout下的阴影,AppBarLayout下的阴影
- Vuex requires a Promise polyfill in this browser
- 物联网团队成功交付必须要养成的习惯
- Spring一个类包含多个构造函数且带的参数相同所存在的注入类型问题
- Jenkins SVN自动构建
- echart 桑基图
- C语言进阶-第22~23讲:问题求解的一般过程&数据结构及算法概述
- Android学习笔记: Android动画特效
- Mac下kafka的环境搭建
- 积攒了这么多技术干货_总有一款适合你