Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): convert file replacements to syst…
Browse files Browse the repository at this point in the history
…em paths before use

The file replacement normalization generates internal Path objects which are not compatible with Windows system paths when used externally.
  • Loading branch information
clydin authored and alan-agius4 committed Nov 5, 2020
1 parent 95a7a1d commit 6703a7f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// TODO: cleanup this file, it's copied as is from Angular CLI.
import { CompilerOptions } from '@angular/compiler-cli';
import { buildOptimizerLoaderPath } from '@angular-devkit/build-optimizer';
import { getSystemPath } from '@angular-devkit/core';
import {
AngularCompilerPlugin,
AngularCompilerPluginOptions,
Expand Down Expand Up @@ -69,7 +70,7 @@ function createIvyPlugin(
const fileReplacements: Record<string, string> = {};
if (buildOptions.fileReplacements) {
for (const replacement of buildOptions.fileReplacements) {
fileReplacements[replacement.replace] = replacement.with;
fileReplacements[getSystemPath(replacement.replace)] = getSystemPath(replacement.with);
}
}

Expand Down

0 comments on commit 6703a7f

Please sign in to comment.