microsoft / microsoft/TypeScript

`tsc --watch` doesn't recompile on file change

未关闭
#63,867 5 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Needs More Info
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

## Steps to reproduce

I haven't been able to reduce this to a minimal reproduction yet. I will continue trying but in the interim, any tips that would help debug the issue would be much appreciated.

I'm running `tsc --build --watch` from one package in a monorepo whose `tsconfig.json` has references to other packages within the monorepo.

Node v24.18.0
macOS 26.5.2 arm64

## Behavior with `typescript@6.0.3`

Changing files in the package triggers a rebuild.

## Behavior with `typescript@7.0.2`

Changing files in the package does not trigger a rebuild.

https://github.com/user-attachments/assets/b12bc159-1db5-42ab-ad5f-33e9a71d7646

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先将报告的 monorepo 案例缩减为最小复现,然后使用 TypeScript 6.0.3 和 7.0.2 运行 `tsc --build --watch`,同时修改 package 中的一个文件。当 7.0.2 的 watch build 能够可靠地检测到更改并重新构建时,工作就完成了。

由索引模型根据 Issue 内容生成。

评估

技术栈
node.js, typescript
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。