fix "exports" path resolution for scoped packages

This commit is contained in:
Evan Wallace
2021-03-16 16:55:28 -07:00
parent 8fcc937ce3
commit fc7707557b
3 changed files with 88 additions and 1 deletions

View File

@@ -717,7 +717,7 @@ func esmParsePackageName(packageSpecifier string) (packageName string, packageSu
if slash2 == -1 {
slash2 = len(packageSpecifier[slash+1:])
}
packageName = packageSpecifier[:slash]
packageName = packageSpecifier[:slash+1+slash2]
}
if strings.HasPrefix(packageName, ".") || strings.ContainsAny(packageName, "\\%") {