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
@ -422,8 +422,8 @@ describe('TypeScriptNodeEmitter', () => {
|
||||
it('should produce a source map that maps back to the source', () => {
|
||||
const statement = someVar.set(o.literal(1)).toDeclStmt();
|
||||
const text = '<my-comp> a = 1 </my-comp>';
|
||||
const sourceName = 'ng://some.file.html';
|
||||
const sourceUrl = 'file:///ng:/some.file.html';
|
||||
const sourceName = '/some/file.html';
|
||||
const sourceUrl = '../some/file.html';
|
||||
const file = new ParseSourceFile(text, sourceName);
|
||||
const start = new ParseLocation(file, 0, 0, 0);
|
||||
const end = new ParseLocation(file, text.length, 0, text.length);
|
||||
|
Reference in New Issue
Block a user