Skip to content

Commit a4b6eca

Browse files
alan-agius4mgechev
authored andcommitted
fix(@angular-devkit/build-angular): implement relative method in extractor FS
This will be needed when the changes in angular/angular#39006 is merged. (cherry picked from commit 1c4d358) Closes: #19005
1 parent e815c3c commit a4b6eca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/angular_devkit/build_angular/src/extract-i18n/ivy-extract-loader.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function localizeExtractLoader(
5151
}
5252

5353
// Setup a virtual file system instance for the extractor
54-
// * MessageExtractor itself uses readFile and resolve
54+
// * MessageExtractor itself uses readFile, relative and resolve
5555
// * Internal SourceFileLoader (sourcemap support) uses dirname, exists, readFile, and resolve
5656
const filesystem = {
5757
readFile(path: string): string {
@@ -63,6 +63,9 @@ export default function localizeExtractLoader(
6363
throw new Error('Unknown file requested: ' + path);
6464
}
6565
},
66+
relative(from: string, to: string): string {
67+
return nodePath.relative(from, to);
68+
},
6669
resolve(...paths: string[]): string {
6770
return nodePath.resolve(...paths);
6871
},

0 commit comments

Comments
 (0)