fix(compiler): make sourcemaps work in AOT mode
Inlcuded fixes: - include preamble in generated source map - always add a mapping for line/col 0 so that the generated sourcemap is not sparse - use a uniue sourceUrl for inline templates even in the AOT case
This commit is contained in:

committed by
Chuck Jazdzewski

parent
c0e05e6f03
commit
492153a986
@ -125,8 +125,10 @@ export function main() {
|
||||
compileAndCreateComponent(MyComp);
|
||||
|
||||
const sourceMap = getSourceMap('ng:///DynamicTestModule/MyComp.ngfactory.js');
|
||||
expect(sourceMap.sources).toEqual([templateUrl]);
|
||||
expect(sourceMap.sourcesContent).toEqual([template]);
|
||||
expect(sourceMap.sources).toEqual([
|
||||
'ng:///DynamicTestModule/MyComp.ngfactory.js', templateUrl
|
||||
]);
|
||||
expect(sourceMap.sourcesContent).toEqual([null, template]);
|
||||
}));
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user