Vue解决安卓4.4不兼容的问题

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 Es6Promise from 'es6-promise'
require('es6-promise').polyfill()
Es6Promise.polyfill()

3.webpack.base.conf.js

entry: { 
app: ["babel-polyfill", "./src/main.js"]//最新的入口 
// app: ‘./src/main.js’//原来的入口 
}, 

你可能感兴趣的:(vuejs)