We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e166548 commit 875a02dCopy full SHA for 875a02d
src/utils/import-path-resolver.ts
@@ -99,7 +99,11 @@ class ImportPathResolver {
99
* If no corresponding file can be found, return the original path.
100
*/
101
private resolveFullPath(importPath: string, ext = '.js') {
102
- if (importPath.match(new RegExp(`\${ext}$`))) {
+ // If bare import or already a full path import
103
+ if (
104
+ !importPath.startsWith('.') ||
105
+ importPath.match(new RegExp(`\${ext}$`))
106
+ ) {
107
return importPath;
108
}
109
// Try adding the extension (if not obviously a directory)
0 commit comments