Skip to content

Commit 1c4d358

Browse files
committed
fix(@angular-devkit/build-angular): implement relative method in extractor FS
This will be needed when the changes in angular/angular#39006 is merged.
1 parent 92f3889 commit 1c4d358

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

+4-1
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)