使用按功能分组的文件夹结构构建Gatsby/React站点。这是一个相当标准的方法..。
然而,如果你用大写字母命名你的文件夹,你会在控制台中得到一些抱怨:
warn 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:
* css [path]/node_modules/css-loader/index.js??ref--14-oneOf-1-1!/[path]/node_modules/postcss-loader/src/index.js??postcss-3![path]/node_modules/sa
ss-loader/dist/cjs.js??ref--14-oneOf-1-3![path]/src/components/Layout/layout.scss 0
Used by 1 module(s), i. e.
[path]/node_modules/mini-css-extract-plugin/dist/loader.js??ref--14-oneOf-1-0!/[path]/node_modules/css-loader/index.js??ref--14-oneOf-1-1!/[path]/node_modules/postcss-loader/src/index.js??postcss-3![path]/node_modules/sass-loader/dist/cjs.j
s??ref--14-oneOf-1-3![path]/src/components/Layout/layout.scss发布于 2021-07-07 16:17:11
将您的文件夹重命名为小写应该可以修复您的警告:
header/
index.tsx
stories.tsx
style.scss
test.tsx
footer/
index.tsx
stories.tsx
style.scss
index.test.tshttps://stackoverflow.com/questions/68282397
复制相似问题