mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The library used by ngcc to update the source files (MagicString) is able to generate a source-map but it is not able to account for any previous source-map that the input text is already associated with. There have been various attempts to fix this but none have been very successful, since it is not a trivial problem to solve. This commit contains a novel approach that is able to load up a tree of source-files connected by source-maps and flatten them down into a single source-map that maps directly from the final generated file to the original sources referenced by the intermediate source-maps. PR Close #35132
21 lines
515 B
TypeScript
21 lines
515 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
/**
|
|
* This interface is the basic structure of the JSON in a raw source map that one might load from
|
|
* disk.
|
|
*/
|
|
export interface RawSourceMap {
|
|
version: number|string;
|
|
file?: string;
|
|
sourceRoot?: string;
|
|
sources: string[];
|
|
names: string[];
|
|
sourcesContent?: (string|null)[];
|
|
mappings: string;
|
|
}
|