为什么 React 应用程序的 node_modules/.cache/babel-loader 文件夹中有数百个 json 文件?

Why are Hundreds of json files in the node_modules/.cache/babel-loader folder in a react app?

使用 create-react-app 设置一个 React 应用程序。 一切正常。 问题: 在 vscode 上,git 选项卡始终显示文件夹 node_modules/.cache/babel-loader 上的数百个 json 文件修改和创建。 这在我以前的项目中没有发生。

我试过重新安装 babel 但没有结果。 删除文件没有任何作用。

文件夹中的文件看起来是休闲的:0aab1329ff345c34fe844d530b69ce5d.json

如果您只看到创建的文件,那么您应该将 node_modules 添加到 .gitignore 文件中。如果您看到修改过的文件,那么您已经将它们提交给源代码管理。您应该使用 git rm 删除它们并仍然将 node_modules 添加到 .gitignore.