在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首字母改成小寫就解除了這個告警資訊
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/139467.html
標籤:JavaScript
