mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(resolver): fix a case where package name and specifier is the wrong order
This commit is contained in:
parent
66c9d764d1
commit
caf1dfbfcd
1 changed files with 1 additions and 1 deletions
|
|
@ -565,7 +565,7 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
|
|||
);
|
||||
}
|
||||
// 4. If the SCOPE/package.json "name" is not the first segment of X, return.
|
||||
let Some(subpath) = package_json.name.as_ref().and_then(|package_json_name| package_json_name.strip_prefix(specifier)) else {
|
||||
let Some(subpath) = package_json.name.as_ref().and_then(|package_json_name| specifier.strip_prefix(package_json_name)) else {
|
||||
return Ok(None);
|
||||
};
|
||||
// 5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(SCOPE),
|
||||
|
|
|
|||
Loading…
Reference in a new issue