From b6b5a1661c0b631ac049a59fe05c2f59372d458f Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:41:54 -0800 Subject: [PATCH] feat(resolve): skip alias to d.ts --- crates/turbopack-resolve/src/typescript.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()