报错信息如下
WARNING in ./src/__BASE__/components/ScrollView.vue
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /Users/zhen/2dfire/myprojects/static-ymir/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/zhen/2dfire/myprojects/static-ymir/node_modules/eslint-loader/index.js??ref--0!/Users/zhen/2dfire/myprojects/static-ymir/src/__BASE__/components/ScrollView.vue
Used by 1 module(s), i. e.
/Users/zhen/2dfire/myprojects/static-ymir/node_modules/ts-loader/index.js??ref--2!/Users/zhen/2dfire/myprojects/static-ymir/node_modules/tslint-loader/index.js!/Users/zhen/2dfire/myprojects/static-ymir/src/activity/main.ts
* /Users/zhen/2dfire/myprojects/static-ymir/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/zhen/2dfire/myprojects/static-ymir/node_modules/eslint-loader/index.js??ref--0!/Users/zhen/2dfire/myprojects/static-ymir/src/__BASE__/components/scrollView.vue
Used by 2 module(s), i. e.
.......
这是在引用组件时路径大小写不对造成的。
上面报错问题如下:
ScrollView.vue在components下的文件名叫scrollView.vue
错误引用:
import ScrollView from '../__BASE__/components/ScrollView.vue'
正确使用:
import ScrollView from '../__BASE__/components/scrollView.vue'