我正在使用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
令人困惑的是,引用的“两个”文件只是一个文件,目录中没有两个文件的名称只有大小写不同。
我还注意到,如果受这些警告的影响,我的热重装器通常不会拾取对文件的更改。
是什么导致此问题?
字母驱动器的大小写也很重要。就我而言,Windows 10在文件中具有大写字母“ C”,而我具有小写字母“ c”。