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.
  • Loading branch information
alan-agius4 committed Sep 28, 2020
1 parent 92f3889 commit 1c4d358
Showing 1 changed file with 4 additions and 1 deletion.
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 1c4d358

Please sign in to comment.