Skip to content

Commit a917d76

Browse files
committed
fixup! cases
1 parent 3473ef6 commit a917d76

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Declare files that will always have LF line endings on checkout.
22
*.txt eol=lf
33
*.ts eol=lf
4+
*.tsx eol=lf
45
*.json eol=lf
56
*.js eol=lf
67
*.md eol=lf

src/common/sourceMaps/sourceMapResolutionUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import * as path from 'path';
77
import { URL } from 'url';
88
import * as utils from '../../common/urlUtils';
99
import { PathMapping } from '../../configuration';
10+
import { IFsUtils } from '../fsUtils';
1011
import { ILogger, LogTag } from '../logging';
1112
import { filterObject } from '../objUtils';
1213
import { fixDriveLetterAndSlashes, properJoin, properResolve } from '../pathUtils';
13-
import { IFsUtils } from '../fsUtils';
1414

1515
export function getFullSourceEntry(sourceRoot: string | undefined, sourcePath: string): string {
1616
if (!sourceRoot) {

src/targets/node/nodeSourcePathResolver.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export class NodeSourcePathResolver extends SourcePathResolverBase<IOptions> {
9191
if (!path.isAbsolute(url) && this.options.basePath) {
9292
url = properResolve(
9393
await getComputedSourceRoot(
94-
this.rebaseRemoteToLocal(map.sourceRoot),
94+
this.options.remoteRoot && urlUtils.isAbsolute(map.sourceRoot)
95+
? this.rebaseRemoteToLocal(map.sourceRoot) || map.sourceRoot
96+
: map.sourceRoot,
9597
map.metadata.compiledPath,
9698
{ '/': this.options.basePath },
9799
moduleAwarePathMappingResolver(this.fsUtils, map.metadata.compiledPath),

0 commit comments

Comments
 (0)