diff --git a/docs/runtime/plugins.mdx b/docs/runtime/plugins.mdx
index 55e7ec5c5596..0d3779791445 100644
--- a/docs/runtime/plugins.mdx
+++ b/docs/runtime/plugins.mdx
@@ -177,7 +177,9 @@ The second argument to `onResolve()` is a callback that runs for each module imp
The callback receives the _path_ to the matching module and can return a _new path_ for it. Bun reads the contents of the _new path_ and parses it as a module.
-At runtime, the callback runs once for each `import` or `require()` as it executes. A _new path_ without a `namespace` is resolved from the importing module like any other import, without running `onResolve()` callbacks on it: it can be relative, leave out its extension, or name a package. If nothing is found there, the _new path_ is used as it is when an [`onLoad()`](#onload) callback matches it, so it does not have to exist on disk.
+At runtime, the callback runs once for each `import` or `require()` as it executes. Bare package names and package subpaths, such as `"my-alias"` and `"@scope/pkg/subpath"`, can be redirected to files without adding an extension to the specifier. A _new path_ without a `namespace` is resolved from the importing module like any other import, without running `onResolve()` callbacks on it: it can be relative, leave out its extension, or name a package. If nothing is found there, the _new path_ is used as it is when an [`onLoad()`](#onload) callback matches it, so it does not have to exist on disk.
+
+Bare names keep normal resolution for builtins, imports made inside an `onResolve` callback, and `require.resolve()` calls with custom search paths.
A bare name such as `"my-virtual.js"` could also be a package in the registry, so `onResolve()` callbacks run on it once more. If one of them returns a path, the name is the plugin's own and is never [auto-installed](/runtime/auto-install).
diff --git a/src/jsc/JSGlobalObject.rs b/src/jsc/JSGlobalObject.rs
index 764473d5e348..eafb2121f429 100644
--- a/src/jsc/JSGlobalObject.rs
+++ b/src/jsc/JSGlobalObject.rs
@@ -728,8 +728,11 @@ impl JSGlobalObject {
) -> JsResult