Skip to content

Commit 9291dda

Browse files
Athorcisalan-agius4
authored andcommitted
fix(@ngtools/webpack): fix recursion in webpack resolve
fix a recursion in webpack resolve when resolving absolute paths on windows
1 parent 27b0218 commit 9291dda

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: 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)