vue支持最低版本IE9
需要补个promise的Polyfill
- npm install --save babel-polyfill- 入口文件里加import 'babel-polyfill'(main.js第一行前加就可以)- package.json里加"dependencies":{"babel-polyfill": "^6.22.0"}
注意:bable-polyfill要添加到dependencies里而不是devDependencies里。
有时候,安装了上述插件后,仍然报错,可以试着用以下方式解决(真心解决了好久)
//webpack.base.conf.js//rules里添加resolve('node_modules/vue-awesome'){ test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test'),resolve('node_modules/vue-awesome')]},