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
@ -287,7 +287,7 @@ export class TsCompilerAotCompilerTypeCheckHostAdapter extends
|
||||
`Invalid Argument: Expected a GenerateFile with statements. ${genFile.genFileUrl}`);
|
||||
}
|
||||
const {sourceText, context} = this.emitter.emitStatementsAndContext(
|
||||
genFile.srcFileUrl, genFile.genFileUrl, genFile.stmts, /* preamble */ '',
|
||||
genFile.genFileUrl, genFile.stmts, /* preamble */ '',
|
||||
/* emitSourceMaps */ false);
|
||||
const sf = ts.createSourceFile(
|
||||
genFile.genFileUrl, sourceText, this.options.target || ts.ScriptTarget.Latest);
|
||||
|
Reference in New Issue
Block a user