From bdb89b322cdb049ef56709113e25c76414b6b9a7 Mon Sep 17 00:00:00 2001 From: Nils Bergmann Date: Mon, 26 Apr 2021 10:02:49 +0200 Subject: [PATCH] fix: allow to remove type only imports including alias path The current behaviour is that type only imports don't get remove if they contain a tsconfig alias. Closes #1145 --- lib/compiler/hooks/tsconfig-paths.hook.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/compiler/hooks/tsconfig-paths.hook.ts b/lib/compiler/hooks/tsconfig-paths.hook.ts index 2672f2f0f..d6f35b60e 100644 --- a/lib/compiler/hooks/tsconfig-paths.hook.ts +++ b/lib/compiler/hooks/tsconfig-paths.hook.ts @@ -35,6 +35,7 @@ export function tsconfigPathsBeforeHookFactory( return node; } (newNode as any).moduleSpecifier = tsBinary.createLiteral(result); + (newNode as any).moduleSpecifier.parent = (node as any).moduleSpecifier.parent; return newNode; } catch { return node;