fix(compiler): don’t use ng://
in AOT source maps, and never point to the original source file
This is important to not confuse users nor downstream tools that consume our source maps. For generated content for which we don’t have an original source file, we use the generated file now. Fixes #19538
This commit is contained in:

committed by
Alex Rickabaugh

parent
5b5108363d
commit
01f711281c
@ -6,7 +6,6 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {sourceUrl} from '../compile_metadata';
|
||||
import {Statement, areAllEquivalent} from '../output/output_ast';
|
||||
import {TypeScriptEmitter} from '../output/ts_emitter';
|
||||
|
||||
@ -45,6 +44,5 @@ export function toTypeScript(file: GeneratedFile, preamble: string = ''): string
|
||||
if (!file.stmts) {
|
||||
throw new Error(`Illegal state: No stmts present on GeneratedFile ${file.genFileUrl}`);
|
||||
}
|
||||
return new TypeScriptEmitter().emitStatements(
|
||||
sourceUrl(file.srcFileUrl), file.genFileUrl, file.stmts, preamble);
|
||||
return new TypeScriptEmitter().emitStatements(file.genFileUrl, file.stmts, preamble);
|
||||
}
|
||||
|
Reference in New Issue
Block a user