相关疑难解决方法(0)

Webpack:"有多个模块的名称只有外壳不同",但引用的模块是相同的

我正在使用webpack 3.8.1并且正在接收以下构建警告的几个实例:

WARNING in ./src/Components/NavBar/MainMenuItemMobile.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:
* /Users/path/to/babel-loader/lib/index.js!/Users/path/to/NavBar/MainMenuItemMobile.js
    Used by 1 module(s), i. e.
    /Users/path/to/babel-loader/lib/index.js!/Users/path/to/NavBar/ConstructedMainMenuItems.js
* /Users/path/to/babel-loader/lib/index.js!/Users/path/to/Navbar/MainMenuItemMobile.js
    Used by 1 module(s), i. e.
    /Users/path/to/babel-loader/lib/index.js!/Users/path/to/Navbar/ConstructedMainMenuItems.js
.....
(webpack)-hot-middleware/client.js ./src/index.js
Run Code Online (Sandbox Code Playgroud)

令人困惑的是,引用的"两个"文件只是一个文件 - 目录中没有两个文件,其名称仅在大小写上有所不同.

我还注意到,如果受到这些警告的影响,我的热重新加载器通常不会对文件进行更改.

可能导致此问题的原因是什么?

webpack webpack-hot-middleware

51
推荐指数
7
解决办法
3万
查看次数

标签 统计

webpack ×1

webpack-hot-middleware ×1