当前位置:主页 > 网页前端 > vue >

Vue中android4.4不兼容问题的解决方法

时间:2021-02-17 14:04:55 | 栏目:vue | 点击:

1.npm安装

npm install babel-polyfill
npm install es6-promise

package.json中会出现

"babel-polyfill": "^6.26.0",
"es6-promise": "^4.1.1",

2.main.js引入

import 'babel-polyfill'
import Vue from 'vue'
import Es6Promise from 'es6-promise'
require('es6-promise').polyfill()
Es6Promise.polyfill()

3.webpack.base.conf.js

module.exports = {
entry: {
"babel-polyfill":"babel-polyfill",
app: './src/main.js'
},

总结

您可能感兴趣的文章:

相关文章