Skip to content

Commit

Permalink
fix(@ngtools/webpack): fix recursion in webpack resolve
Browse files Browse the repository at this point in the history
fix a recursion in webpack resolve when resolving absolute paths on windows

(cherry picked from commit 9291dda)
  • Loading branch information
Athorcis authored and alan-agius4 committed Sep 15, 2023
1 parent 1f9caa9 commit f1195d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/ngtools/webpack/src/paths-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f1195d0

Please sign in to comment.