我有以下项目结构:
my-monorepo
├── tsconfig.json
└── packages
├── package-one
│ └── index.ts: import packageThree from '@my-monorepo/package-three'
├── package-two
│ └── index.ts: import packageThree from '@my-monorepo/package-three'
└── package-three
└── index.ts: // have some ts error
在这种情况下,
tsb -b
报告错误,包三包x3次。"skipLibCheck": true,
"exclude": ["node_modules"]
如何让typscript仅扫描src文件而不深入研究依赖关系?
我也遇到同样的问题。我用以下命令修复了它:
tsc --build --pretty