IE報vuex requires a Promise polyfill in this browser問題解決

解決方法
第一步: 安裝 babel-polyfill 。 babel-polyfill能夠模擬ES6使用的環境,可使用ES6的全部新方法webpack

npm install --save babel-polyfillweb

第二步: 在 Webpack/Browserify/Node中使用npm

在webpack.config.js文件中,使用babel

module.exports = {
entry: {app

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

}
};code

替換module

module.exports = {
entry: {方法

app:  './src/main.js'

}
}exports

相關文章
相關標籤/搜索