Skip to content

Commit

Permalink
fix(mappings): check baseUrl before transform
Browse files Browse the repository at this point in the history
  • Loading branch information
fathyb committed Dec 19, 2017
1 parent 4abdf64 commit 10863f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/backend/transformers/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export function PathTransform(options: ts.CompilerOptions): ts.TransformerFactor
}

function resolve(modulePath: string, {paths, baseUrl}: ts.CompilerOptions): string {
if(!baseUrl) {
return modulePath
}

let resolved = findModule(path.resolve(baseUrl, modulePath))

if(resolved) {
Expand Down

0 comments on commit 10863f1

Please sign in to comment.