From 9291ddab85f83eb3b5f2a1bb5f960ff9e57d38fb Mon Sep 17 00:00:00 2001 From: Athorcis Date: Fri, 15 Sep 2023 11:27:24 +0200 Subject: [PATCH] fix(@ngtools/webpack): fix recursion in webpack resolve fix a recursion in webpack resolve when resolving absolute paths on windows --- packages/ngtools/webpack/src/paths-plugin.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/ngtools/webpack/src/paths-plugin.ts b/packages/ngtools/webpack/src/paths-plugin.ts index 72bd0e4abd22..a6b23abd811b 100644 --- a/packages/ngtools/webpack/src/paths-plugin.ts +++ b/packages/ngtools/webpack/src/paths-plugin.ts @@ -141,10 +141,16 @@ export class TypeScriptPathsPlugin { return; } + // Absolute requests are not mapped + if (path.isAbsolute(originalRequest)) { + callback(); + + return; + } + switch (originalRequest[0]) { case '.': - case '/': - // Relative or absolute requests are not mapped + // Relative requests are not mapped callback(); return;