Skip to content

Commit 31f4957

Browse files
Revert "Optimize source mapping into external source map sources (#40055)" (#40126)
This reverts commit 1e84ffc.
1 parent a0d457e commit 31f4957

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/compiler/sourcemap.ts

-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace ts {
1313
const rawSources: string[] = [];
1414
const sources: string[] = [];
1515
const sourceToSourceIndexMap = new Map<string, number>();
16-
const fileNameToSourceIndexMap = new Map<string, number>();
1716
let sourcesContent: (string | null)[] | undefined;
1817

1918
const names: string[] = [];
@@ -52,10 +51,6 @@ namespace ts {
5251

5352
function addSource(fileName: string) {
5453
enter();
55-
const sourceIndexByFileName = fileNameToSourceIndexMap.get(fileName);
56-
if (sourceIndexByFileName !== undefined) {
57-
return sourceIndexByFileName;
58-
}
5954
const source = getRelativePathToDirectoryOrUrl(sourcesDirectoryPath,
6055
fileName,
6156
host.getCurrentDirectory(),
@@ -69,7 +64,6 @@ namespace ts {
6964
rawSources.push(fileName);
7065
sourceToSourceIndexMap.set(source, sourceIndex);
7166
}
72-
fileNameToSourceIndexMap.set(fileName, sourceIndex);
7367
exit();
7468
return sourceIndex;
7569
}

0 commit comments

Comments
 (0)