您的位置:首页 > Web前端

There are multiple modules with names that only differ in casing. This can lead to unexpected....

2018-01-26 10:00 477 查看
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:




在基于webpack的vue下引用模块一直报这种警告,虽然不影响运行,但真的好烦,这警告大概意思就是说这个模块在其他地方也引用了,因为引用时的名字相同,这可能会造成项目打包上线的时候会出现系统引用错误….

这是npm安装的cookie模块


引用的时候我们都会
let Cookie = require('js-cookie')
,然而肯定不止一处会引用,因为Windows不区分大小写,所以引用的几处不要出现名称相同 具体如下:

const Cookie = require('js-cookie');




const Cookie = require('js-Cookie');


是一样的,这样就可以解决因引用相同模块而造成的某种混乱的警告了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐