Skip to content

Commit 6703a7f

Browse files
clydinalan-agius4
authored andcommitted
fix(@angular-devkit/build-angular): convert file replacements to system paths before use
The file replacement normalization generates internal Path objects which are not compatible with Windows system paths when used externally.
1 parent 95a7a1d commit 6703a7f

File tree

1 file changed

+2
-1
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+2
-1
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// TODO: cleanup this file, it's copied as is from Angular CLI.
1010
import { CompilerOptions } from '@angular/compiler-cli';
1111
import { buildOptimizerLoaderPath } from '@angular-devkit/build-optimizer';
12+
import { getSystemPath } from '@angular-devkit/core';
1213
import {
1314
AngularCompilerPlugin,
1415
AngularCompilerPluginOptions,
@@ -69,7 +70,7 @@ function createIvyPlugin(
6970
const fileReplacements: Record<string, string> = {};
7071
if (buildOptions.fileReplacements) {
7172
for (const replacement of buildOptions.fileReplacements) {
72-
fileReplacements[replacement.replace] = replacement.with;
73+
fileReplacements[getSystemPath(replacement.replace)] = getSystemPath(replacement.with);
7374
}
7475
}
7576

0 commit comments

Comments
 (0)