vue版本2.5.12
axios版本1.6.6(原版本)
报错信息
ERROR in ./node_modules/axios/lib/platform/index.js
Module parse failed: Unexpected token (5:2)
You may need an appropriate loader to handle this file type.
|
| export default {
| ...utils,
| ...platform
| }
@ ./node_modules/axios/lib/defaults/index.js 8:0-44
@ ./node_modules/axios/lib/axios.js
@ ./node_modules/axios/index.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
解决方法:
安装旧版本的axios,在这里我用的是0.16.2