-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve modules if folder contains a package.json file
getMappedPath only resolves to files that exist. This does not work when a TSConfig path alias resolves to a module folder containing built assets, and described by a package.json, e.g. foo/dist. If the tsconfig path is mapped to a folder, then getMappedPath returns undefined as the folder is not a file. However, in somes cases it is ok for this to resolve as the package.json contains a `typings` entry that references a .d.ts file, which is correctly handled by enhanced-resolve
- Loading branch information
1 parent
85f64d0
commit 7d2642d
Showing
4 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"type": "commonjs", | ||
"typings": "./module.d.ts", | ||
"private": true | ||
} |