Skip to content

Commit 64cf05b

Browse files
clydinfilipesilva
authored andcommitted
fix(@ngtools/webpack): resolve relative host replacement paths
Fixes: #11801
1 parent af415a2 commit 64cf05b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,11 @@ export class AngularCompilerPlugin {
597597
replacements = new Map();
598598
const aliasHost = new virtualFs.AliasHost(host);
599599
for (const from in this._options.hostReplacementPaths) {
600-
const normalizedFrom = normalize(from);
601-
const normalizedWith = normalize(this._options.hostReplacementPaths[from]);
600+
const normalizedFrom = resolve(normalize(this._basePath), normalize(from));
601+
const normalizedWith = resolve(
602+
normalize(this._basePath),
603+
normalize(this._options.hostReplacementPaths[from]),
604+
);
602605
aliasHost.aliases.set(normalizedFrom, normalizedWith);
603606
replacements.set(normalizedFrom, normalizedWith);
604607
}

0 commit comments

Comments
 (0)