Skip to content

Commit f98f0d5

Browse files
clydinKeen Yee Liau
authored and
Keen Yee Liau
committed
fix(@ngtools/webpack): ignore webpack special requests when pathmapping
1 parent bb01cce commit f98f0d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export class TypeScriptPathsPlugin {
6565
return;
6666
}
6767

68-
// Amd requests are not mapped
69-
if (originalRequest.startsWith('!!webpack amd')) {
68+
// Ignore all webpack special requests
69+
if (originalRequest.startsWith('!!')) {
7070
return;
7171
}
7272

@@ -113,6 +113,10 @@ function findReplacements(
113113
});
114114
}
115115
} else if (starIndex === 0 && pattern.length === 1) {
116+
if (potentials.length === 1 && potentials[0] === '*') {
117+
// identity mapping -> noop
118+
continue;
119+
}
116120
pathMapOptions.push({
117121
starIndex,
118122
partial: originalRequest,

0 commit comments

Comments
 (0)