当前位置: 移动技术网 > IT编程>开发语言>JavaScript > vue使用vuex后报警:There are multiple modules with names that only differ in casing.

vue使用vuex后报警:There are multiple modules with names that only differ in casing.

2020年03月26日  | 移动技术网IT编程  | 我要评论

孟广美不照雅照片,伊熙水,下水道人鱼图片

在vue项目中使用了vuex,但是项目跑起来之后控制台告警:

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:

  • f:\dch\workspace\pms\node_modules\vuex\dist\vuex.esm.js
    used by 1 module(s), i. e.
    f:\dch\workspace\pms\node_modules\babel-loader\lib\index.js!f:\dch\workspace\pms\node_modules\eslint-loader\index.js??ref--0!f:\dch\workspace\pms\src\store\index.js
  • f:\dch\workspace\pms\node_modules\vuex\dist\vuex.esm.js
    used by 9 module(s), i. e.
    f:\dch\workspace\pms\node_modules\babel-loader\lib\index.js!f:\dch\workspace\pms\node_modules\vue-loader\lib\selector.js?type=script&index=0!f:\dch\workspace\pms\src\views\server.vue

这是因为在引入vuex的时候有的地方首字母大写有的地方首字母小写引起的。具体代码如下:
store/index.js引入代码如下:

import vuex from "vuex";

在vue文件引入vuex的代码如下:

import { mapmutations } from "vuex";

将index.js引入的vuex首字母改成小写就解除了这个告警信息

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网