mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
14 lines
483 B
TypeScript
14 lines
483 B
TypeScript
// There are no type definitions available for these imports.
|
|
const sorcery = require('sorcery');
|
|
|
|
/**
|
|
* Finds the original sourcemap of the file and maps it to the current file.
|
|
* This is useful when multiple transformation happen (e.g TSC -> Rollup -> Uglify)
|
|
**/
|
|
export async function remapSourcemap(sourceFile: string) {
|
|
// Once sorcery loaded the chain of sourcemaps, the new sourcemap will be written asynchronously.
|
|
return (await sorcery.load(sourceFile)).write();
|
|
}
|
|
|
|
|