diff --git a/crates/turbopack-resolve/src/typescript.rs b/crates/turbopack-resolve/src/typescript.rs index 732e805e65617..0f6d614dceff6 100644 --- a/crates/turbopack-resolve/src/typescript.rs +++ b/crates/turbopack-resolve/src/typescript.rs @@ -270,7 +270,13 @@ pub async fn tsconfig_resolve_options( let entries = vec .iter() .filter_map(|entry| { - entry.as_str().map(|s| { + let entry = entry.as_str(); + + if entry.map(|e| e.ends_with(".d.ts")).unwrap_or_default() { + return None; + } + + entry.map(|s| { // tsconfig paths are always relative requests if s.starts_with("./") || s.starts_with("../") { s.to_string()