1.vue版本为2.6.11
ui的默认安装less和less-loder版本为4.12和10.2,编译时会报错
error in ./src/components/?vue&type=style&index=0&id=10d9df09&lang=less&scoped=true&
Syntax Error: TypeError: is not a function
@ ./node_modules/vue-style-loader??ref--11-oneOf-1-0!./node_modules/css-loader/dist/??ref--11-oneOf-1-1!./node_modules/vue-loader/lib/loaders/!./node_modules/postcss-loader/src??ref--11-oneOf-1-2!./node_modules/less-loader/dist/??ref--11-oneOf-1-3!./node_modules/cache-loader/dist/??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/?vue&type=style&index=0&id=10d9df09&lang=less&scoped=true& 4:14-463 15:3-20:5 16:22-471
@ ./src/components/?vue&type=style&index=0&id=10d9df09&lang=less&scoped=true&
@ ./src/components/
@ ./src/router/
@ ./src/
@ multi (webpack)-dev-server/client?http://192.168.1.2:8080&sockPath=/sockjs-node (webpack)/hot/ ./src/
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
3.解决方案:
在中less和less-loder的版本设置为3.9.0和5.0.0。