diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-09-03 15:56:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 13:56:39 +0000 |
commit | b8ed6f822174b2322fbe9f8b58698b76b5505b4a (patch) | |
tree | 324f208e53ac8f5ee1f04e7c69fc7d8f4946c81e /ext/node_resolver | |
parent | 7c594023256ffdc8a16db017676319da448dd926 (diff) |
fix(task): correct name for scoped npm package binaries (#25390)
This is for when not using a node_modules directory or when using auto
install for a node_modules dir.
Diffstat (limited to 'ext/node_resolver')
-rw-r--r-- | ext/node_resolver/resolution.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/node_resolver/resolution.rs b/ext/node_resolver/resolution.rs index ae791e312..ad9dbb710 100644 --- a/ext/node_resolver/resolution.rs +++ b/ext/node_resolver/resolution.rs @@ -367,6 +367,7 @@ impl<TEnv: NodeResolverEnv> NodeResolver<TEnv> { pkg_json_path, }); }; + let name = name.split("/").last().unwrap(); vec![name.to_string()] } Some(Value::Object(o)) => { |