Skip to content

Commit f1195d0

Browse files
Athorcisalan-agius4
authored andcommittedSep 15, 2023
fix(@ngtools/webpack): fix recursion in webpack resolve
fix a recursion in webpack resolve when resolving absolute paths on windows (cherry picked from commit 9291dda)
1 parent 1f9caa9 commit f1195d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎packages/ngtools/webpack/src/paths-plugin.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,16 @@ export class TypeScriptPathsPlugin {
141141
return;
142142
}
143143

144+
// Absolute requests are not mapped
145+
if (path.isAbsolute(originalRequest)) {
146+
callback();
147+
148+
return;
149+
}
150+
144151
switch (originalRequest[0]) {
145152
case '.':
146-
case '/':
147-
// Relative or absolute requests are not mapped
153+
// Relative requests are not mapped
148154
callback();
149155

150156
return;

0 commit comments

Comments
 (0)
Please sign in to comment.