Skip to content

Commit

Permalink
1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
justkey007 committed Nov 7, 2022
1 parent 0cc8834 commit 39e76bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsc-alias",
"version": "1.7.0",
"version": "1.7.1",
"description": "Replace alias paths with relative paths after typescript compilation.",
"main": "dist/index.js",
"files": [
Expand Down
5 changes: 4 additions & 1 deletion src/utils/import-path-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ class ImportPathResolver {
}
// Assume the path is a folder; try adding index.js
let asFilePath = join(importPath, 'index.js');
if ((importPath.startsWith('./') || importPath === '.') && !asFilePath.startsWith('./')) {
if (
(importPath.startsWith('./') || importPath === '.') &&
!asFilePath.startsWith('./')
) {
asFilePath = './' + asFilePath;
}
return existsSync(resolve(this.sourceDir, asFilePath))
Expand Down

0 comments on commit 39e76bf

Please sign in to comment.