我在使用 Azure DevOps 构建管道构建 React 应用程序时遇到此错误。关于如何解决它有什么想法吗?我尝试更新我的 tsconfig 以包含
"exclude": ["node_modules"]
和 "skipLibCheck": true
属性,但错误仍然存在..
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"strict": false,
"noImplicitAny": false,
"strictPropertyInitialization": false,
"esModuleInterop": true,
"skipLibCheck": true
},
"include": ["src/*"],
"exclude": ["node_modules"]
}
我需要更新我的
.csproj
以使用 ReactTsConfig
而不是 Content
来处理嵌套文件夹中的任何 tsconfig.json
文件:
<Content Include="tsconfig.json" />
<ReactTSConfig Include="path\to\folder\tsconfig.json" />