We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abcaaf2 commit d7d95abCopy full SHA for d7d95ab
lib/module-name-mapper-helper.js
@@ -11,7 +11,7 @@ const matchModuleImport = /^[^?]*~/
11
function resolve(to, importPath, fileType) {
12
importPath =
13
path.extname(importPath) === '' ? `${importPath}.${fileType}` : importPath
14
- if (importPath.startsWith('/')) {
+ if (path.isAbsolute(importPath)) {
15
return importPath
16
} else if (matchModuleImport.test(importPath)) {
17
return require.resolve(importPath.replace(matchModuleImport, ''))
0 commit comments