vue在IE下运行报错:vuex requires a Promise polyfill in this browser

解决方法:
第一步: 安装 babel-polyfill( babel-polyfill可以模拟ES6使用的环境,可以使用ES6的所有新方法)

npm install --save babel-polyfill

第二步:修改webpack.config.js文件

module.exports = {
  context: path.resolve(__dirname, '../'),
  entry: {
    //app: './src/main.js'
    app: ["babel-polyfill", "./src/main.js"]
  },

app: ["babel-polyfill", "./src/main.js"]
替换 app: './src/main.js'

你可能感兴趣的:(vue2)