错误 TS6266:构建:选项“listFilesOnly”只能在命令行上指定

问题描述 投票:0回答:1

我在使用 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"]
}
reactjs typescript azure-devops tsconfig azureportal
1个回答
0
投票

我需要更新我的

.csproj
以使用
ReactTsConfig
而不是
Content
来处理嵌套文件夹中的任何
tsconfig.json
文件:

<Content Include="tsconfig.json" />
<ReactTSConfig Include="path\to\folder\tsconfig.json" />
© www.soinside.com 2019 - 2024. All rights reserved.