Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): implement relative method in ex…
Browse files Browse the repository at this point in the history
…tractor FS

This will be needed when the changes in angular/angular#39006 is merged.

(cherry picked from commit 1c4d358)

Closes: #19005
  • Loading branch information
alan-agius4 authored and mgechev committed Oct 8, 2020
1 parent e815c3c commit a4b6eca
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function localizeExtractLoader(
}

// Setup a virtual file system instance for the extractor
// * MessageExtractor itself uses readFile and resolve
// * MessageExtractor itself uses readFile, relative and resolve
// * Internal SourceFileLoader (sourcemap support) uses dirname, exists, readFile, and resolve
const filesystem = {
readFile(path: string): string {
Expand All @@ -63,6 +63,9 @@ export default function localizeExtractLoader(
throw new Error('Unknown file requested: ' + path);
}
},
relative(from: string, to: string): string {
return nodePath.relative(from, to);
},
resolve(...paths: string[]): string {
return nodePath.resolve(...paths);
},
Expand Down

0 comments on commit a4b6eca

Please sign in to comment.