From d6a0b1da317bbfa6e1a66619fbbf45d03f78bdea Mon Sep 17 00:00:00 2001 From: pshu Date: Fri, 21 Aug 2026 13:43:31 +0800 Subject: [PATCH] Revert "fix(tsconfig): stop reporting tsconfig files as file dependencies (#291)" This reverts commit 53551699055a6aafbb55a90885324acb5069a9a4. --- src/lib.rs | 10 +++------- src/tests/tsconfig_project_references.rs | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0ec572c2..b610ed06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1490,13 +1490,9 @@ impl ResolverGeneric { &tsconfig_options.references, ) .await?; - // TODO: restore once these can be reported without costing `module count * tsconfig count`. - // Temporarily disabled: a monorepo with project references bursts memory in the consumer, - // which keeps this set per module. Trade-off: tsconfig edits won't invalidate watch builds. - // See `tsconfig_file_as_file_dependencies`, ignored for now. - // for dependency in &tsconfig.file_dependencies { - // ctx.add_file_dependency(dependency.as_path()); - // } + for dependency in &tsconfig.file_dependencies { + ctx.add_file_dependency(dependency.as_path()); + } let paths = tsconfig.resolve(cached_path.path(), specifier); for path in paths { let cached_path = self.cache.value(&path); diff --git a/src/tests/tsconfig_project_references.rs b/src/tests/tsconfig_project_references.rs index 95b3c9cc..6ea71e73 100644 --- a/src/tests/tsconfig_project_references.rs +++ b/src/tests/tsconfig_project_references.rs @@ -45,8 +45,6 @@ async fn auto() { } #[tokio::test] -#[ignore = "temporary workaround: tsconfig and its references are no longer reported as file dependencies, \ - because a monorepo with many project references bursts memory in the consumer"] async fn tsconfig_file_as_file_dependencies() { let f = super::fixture_root().join("tsconfig/cases/project_references");