引用文件时路径大小写不对

这是引用组件时,路径大小写不对导致的警告

WARNING in ./node_modules/Vue/dist/vue.runtime.esm.js
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:

  • D:\web\vue\06\02-webpack-vue\node_modules\Vue\dist\vue.runtime.esm.js
    Used by 1 module(s), i. e.
    D:\web\vue\06\02-webpack-vue\node_modules\babel-loader\lib\index.js!D:\web\vue\06\02-webpack-vue\src\main.js
  • D:\web\vue\06\02-webpack-vue\node_modules\vue\dist\vue.runtime.esm.js
    Used by 1 module(s), i. e.
    D:\web\vue\06\02-webpack-vue\node_modules\vue-loader\lib\index.js??vue-loader-options!D:\web\vue\06\02-webpack-vue\src\login.vue
    @ ./node_modules/Vue/dist/vue.runtime.esm.js
    @ ./src/main.js
    @ multi (webpack)-dev-server/client?http://localhost:5000 webpack/hot/dev-server ./src/main.js

这是引用组件时,路径大小写不对导致的。比如

vue 包的名字是小写的,这样写就会报错:

import Vue from 'Vue';

按照下面的写法就ok:

import Vue from 'vue';
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容