From 531e89a74af8a1e040b8115140c38d39dc2baa88 Mon Sep 17 00:00:00 2001 From: Boshen Date: Thu, 24 Aug 2023 22:03:30 +0800 Subject: [PATCH] Revert "fix(resolver): fix a case where package name and specifier is the wrong order" This reverts commit caf1dfbfcd47db796ebcf9e95f619379c254b3e4. --- crates/oxc_resolver/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_resolver/src/lib.rs b/crates/oxc_resolver/src/lib.rs index bb118a64f..e3ea3b9db 100644 --- a/crates/oxc_resolver/src/lib.rs +++ b/crates/oxc_resolver/src/lib.rs @@ -633,7 +633,7 @@ impl ResolverGeneric { ); } // 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| specifier.strip_prefix(package_json_name)) else { + let Some(subpath) = package_json.name.as_ref().and_then(|package_json_name| package_json_name.strip_prefix(specifier)) else { return Ok(None); }; // 5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(SCOPE),