fix(compiler): make .ngsummary.json files idempotent (#21448)

Fixes: #21432

PR Close #21448
This commit is contained in:
Chuck Jazdzewski
2018-01-10 09:55:03 -08:00
committed by Alex Eagle
parent 6a97b5b722
commit a931a419fa
5 changed files with 18 additions and 1 deletions

View File

@ -496,6 +496,8 @@ export class MockStaticSymbolResolverHost implements StaticSymbolResolverHost {
getMetadataFor(moduleId: string): any { return this._getMetadataFor(moduleId); }
getOutputName(filePath: string): string { return filePath; }
private _getMetadataFor(filePath: string): any {
if (this.data[filePath] && filePath.match(TS_EXT)) {
const text = this.data[filePath];

View File

@ -386,6 +386,8 @@ export class MockAotCompilerHost implements AotCompilerHost {
return resolved ? resolved.resolvedFileName : null;
}
getOutputName(filePath: string) { return filePath; }
resourceNameToFileName(resourceName: string, containingFile: string) {
// Note: we convert package paths into relative paths to be compatible with the the
// previous implementation of UrlResolver.