vue 不支持ie11解决方案

  作者:chrispy

npm ies6-promisenpm install --save babel-polyfillpackage.json 文件中添加dependencies:{"es6-promise": "^4.2.4"},devDependencies:{"babel-polyfill": "^6.26.0",}main.js 文件添加import 'babel-polyfill'impor

npm i es6-promise

npm install --save babel-polyfill

package.json 文件中

添加

dependencies:{

"es6-promise": "^4.2.4"

},

devDependencies:{

"babel-polyfill": "^6.26.0",

}

main.js 文件添加

import 'babel-polyfill'

import promise from 'es6-promise'

promise.polyfill()

build文件夹下webpack.base.conf.js

module.exports = {

context: path.resolve(__dirname, '../'),

entry: {

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

}


有用  |  无用

猜你喜欢