Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
frankleng committed Mar 27, 2022
1 parent 69c4fb5 commit d325ac5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ module.exports = (relativeTsconfigPath = "./tsconfig.json") => {
const pathKey = pathKeys.find((pkey) => new RegExp(`^${pkey}`).test(args.path));
const [pathDir] = pathKey.split("*");
let file = args.path.replace(pathDir, "");
if (file === args.path) { // if importing from root of alias
file = ""
if (file === args.path) {
// if importing from root of alias
file = "";
}
for (const dir of compilerOptions.paths[pathKey]) {
const fileDir = normalizePath(path.resolve(process.cwd(), dir).replace("*", file));
Expand Down

0 comments on commit d325ac5

Please sign in to comment.