File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -81,14 +81,18 @@ added: v23.2.0
8181* ` base` {string|URL} The absolute location (` file: ` URL string or FS path) of the
8282 containing module. For CJS, use ` __filename ` (not ` __dirname ` !); for ESM, use
8383 ` import .meta.url` . You do not need to pass it if ` specifier` is an ` absolute specifier` .
84- * Returns: {string|undefined} A path if the ` package.json` is found. When ` startLocation `
84+ * Returns: {string|undefined} A path if the ` package.json` is found. When ` specifier `
8585 is a package, the package's root ` package.json` ; when a relative or unresolved, the closest
86- ` package.json` to the ` startLocation ` .
86+ ` package.json` to the ` specifier ` .
8787
8888> **Caveat**: Do not use this to try to determine module format. There are many things effecting
8989> that determination; the ` type` field of package.json is the _least_ definitive (ex file extension
9090> superceeds it, and a loader hook superceeds that).
9191
92+ > **Caveat**: This currently leverages only the built-in default resolver; if
93+ > [` resolve` customization hooks][resolve hook] are registered, they will not effect the resolution.
94+ > This may change in future.
95+
9296` ` ` text
9397/ path/ to/ project
9498 ├ packages/
You can’t perform that action at this time.
0 commit comments