zoukankan      html  css  js  c++  java
  • 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.

    This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
    Use equal casing. Compare these module identifiers:

    • F:dchworkspacePMS ode_modulesVuexdistvuex.esm.js
      Used by 1 module(s), i. e.
      F:dchworkspacePMS ode_modulesabel-loaderlibindex.js!F:dchworkspacePMS ode_moduleseslint-loaderindex.js??ref--0!F:dchworkspacePMSsrcstoreindex.js
    • F:dchworkspacePMS ode_modulesvuexdistvuex.esm.js
      Used by 9 module(s), i. e.
      F:dchworkspacePMS ode_modulesabel-loaderlibindex.js!F:dchworkspacePMS ode_modulesvue-loaderlibselector.js?type=script&index=0!F:dchworkspacePMSsrcviewsserver.vue

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

    import Vuex from "Vuex";
    

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

    import { mapMutations } from "vuex";
    

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

  • 相关阅读:
    LA3971组装电脑
    LA3971组装电脑
    LA3905流星
    LA3905流星
    LA3902网络
    LA3902网络
    LA3708墓地雕塑
    洛谷 P2330 [SCOI2005]繁忙的都市(最小生成树)
    最小生成树 & 洛谷P3366【模板】最小生成树 & 洛谷P2820 局域网
    洛谷 P1372 又是毕业季I
  • 原文地址:https://www.cnblogs.com/xzsty/p/12567583.html
Copyright © 2011-2022 走看看