Error: [vuex] vuex requires a Promise polyfill in this browser. 与 babel-polyfill 的问题

采用最笨重的解决方案就是npm install babel-polyfill 然后在webpack中如此设置:

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

但在开发环境下,我们在IE11打开的时候依然有问题(但在现代浏览器中浏览居然没问题)。打开源码,可以看到是app.js先加载,然后才加载babel-polyfill. 其实在生产环境下(webpack编译之后)。可以正常运行。这是因为在webpack.prod.conf.js中的HtmlWebpackPlugin加入了 hunksSortMode: 'dependency' 属性。所以我们只要依样画葫芦。在webpack.dev.conf.js中找到HtmlWebpackPlugin加入了 hunksSortMode: 'dependency' 属性即可

Error: [vuex] vuex requires a Promise polyfill in this browser. 与 babel-polyfill 的问题的更多相关文章

  1. IE报vuex requires a Promise polyfill in this browser问题解决

    使用Vuex, IE浏览器报错 因为使用了 ES6 中用来传递异步消息的的Promise,而IE低版本的浏览器不支持. ##解决方法 第一步: 安装 babel-polyfill . babel-po ...

  2. vuex requires a Promise polyfill in this browser

    ie 浏览器访问 vue 项目(使用的vuex 状态管理组件)报错:vuex requires a Promise polyfill in this browser 处理办法: 1.npm insta ...

  3. vue 坑之 vuex requires a Promise polyfill in this browser

    android内嵌H5页面不显示出现这个问题,原因有很多 首先,别急,请看下面的推荐方案: 1.找个Android真机测试下(机型版本为4.4以上),真机联调测试 Android 只需要四个步骤: 1 ...

  4. 解决IE下页面空白或者报错:[vuex] vuex requires a Promise polyfill in this browser

    [vuex] vuex requires a Promise polyfill in this browser 上述错误的原因是不支持 Promise 方法,导致页面出现空白无法加载. 解决方法如下: ...

  5. vuex requires a Promise polyfill in this browser.--ie-vue-兼容处理日记

    1.ie9+报错vuex requires a Promise polyfill in this browser. 解决如下: npm install --save-dev -polyfill 修改c ...

  6. vue项目在IE下报 [vuex] vuex requires a Promise polyfill in this browser错误

    ie浏览器下报错 vue刚搭建的项目,在谷歌浏览器能够正常访问,但是在ie11等ie浏览器下无法显示页面,打开控制台查看无报错信息,打开仿真一栏,提示[vuex] vuex requires a Pr ...

  7. android studio出现Error:compileSdkVersion android-x requires compiling with JDK 7问题

    初装Android studio的童鞋可能或多或少会存在一些问题,比如出现Error:compileSdkVersion android-x requires compiling with JDK 7 ...

  8. error: qrc_qml.obj: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC解决办法

    使用qtcreator加androidndk编译项目时报错: error: qrc_qml.obj: requires unsupported dynamic reloc R_ARM_REL32; r ...

  9. Linux(CentOS6.5)下编译安装PHP5.6.22时报错”configure: error: ZLIB extension requires gzgets in zlib”的解决方式(确定已经编译安装Zlib,并已经指定Zlib路径)

    本文地址http://comexchan.cnblogs.com/,作者Comex Chan,尊重知识产权,转载请注明出处,谢谢!   今天在CentOS6.5下编译安装PHP时,一直报错 confi ...

随机推荐

  1. tensorflow bilstm官方示例

    ''' A Bidirectional Recurrent Neural Network (LSTM) implementation example using TensorFlow library. ...

  2. notepad++ 开始和结尾

    作者:zecy链接:https://www.zhihu.com/question/37708379/answer/73181634来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...

  3. JAVA net 笔记

    1.InetAddress 获取主机ip等 2.URL 3.URLConnection (url.openConnection() 创建对象) 4.BufferedReader 5.InputStre ...

  4. HTTP状态代码集

    所有 HTTP 状态代码及其定义.   代码  指示     2xx  成功     200  正常:请求已完成.     201  正常:紧接 POST 命令.     202  正常:已接受用于处 ...

  5. [Codeforces 8D] Two Friends

    Brief Introduction: 有两人a.b,他们都在A点,a经过B点到C点,而b直接到C点.a走过的距离不超过la,b走过距离不超过lb,询问他们可能经过最长的公共距离. Algorithm ...

  6. [BZOJ 1228] E&D

    Link:https://www.lydsy.com/JudgeOnline/problem.php?id=1228 Solution: 感觉自己对博弈论的理论一直了解得不够透彻 一篇讲原理的文章:S ...

  7. POJ 3728 The merchant(并查集+DFS)

    [题目链接] http://poj.org/problem?id=3728 [题目大意] 给出一棵树,每个点上都可以交易货物,现在给出某货物在不同点的价格, 问从u到v的路程中,只允许做一次买入和一次 ...

  8. 【对询问分块】CODEVS1080 线段树练习

    #include<cstdio> #include<cmath> using namespace std; #define N 100001 int sum[N],a[N],n ...

  9. <摘录>Linux下动态共享库加载时的搜索路径详解

    对动态库的实际应用还不太熟悉的读者可能曾经遇到过类似“error while loading shared libraries”这样的错误,这是典型的因为需要的动态库不在动态链接器ld.so的搜索路径 ...

  10. 如何订阅Linux相关的邮件列表

    转:http://blog.163.com/sunshine_linting/blog/static/44893323201282114012845/ 1.google"linux kern ...