fix(javascript): preserve trailing slash in package directory requests (#1615)
This commit is contained in:
1 parent
52331ab637
commit
423b11c8ef
2 files changed
+8
-1
No files matched your search
@@ -234,7 +234,8 @@ const resolvePackageSpecifier = (
|
||||
if (rawExports === undefined || rawExports === null) {
|
||||
if (subpath === ".")
|
||||
return resolveDirectory(input, directory, metadata, new Set());
|
||||
const candidate = confineCandidate(posix.join(directory, subpath.slice(2)));
|
||||
// Preserve the trailing slash for a package directory request.
|
||||
const candidate = confineCandidate(`${directory}/${subpath.slice(2)}`);
|
||||
return typeof candidate === "string"
|
||||
? resolveCandidate(input, candidate, new Set())
|
||||
: candidate;
|
||||
|
||||
Reference in new issue
Block a user