You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not clear from the docs that require.resolve automatically adds the global folder to the module search path when using the paths option. It's clear that each path provided will be used as the starting point of a node_modules hierarchy. However, no where is it stated that the global folders (like ~/.node_modules) are added implicitly, leading one to assume that these paths are not search when the paths option is specified.
My proposed change is highlighted in bold.
Paths to resolve module location from. If present, these paths are used instead of the default resolution paths, with the exception of the global folders like ~/.node_modules, which are always included. Note that each of these paths is used as a starting point for the module resolution algorithm, meaning that the node_modules hierarchy is checked from this location.
I'd be happy to submit a patch if this proposed change is acceptable.
The text was updated successfully, but these errors were encountered:
It's not clear from the docs that
require.resolve
automatically adds the global folder to the module search path when using thepaths
option. It's clear that each path provided will be used as the starting point of a node_modules hierarchy. However, no where is it stated that the global folders (like~/.node_modules
) are added implicitly, leading one to assume that these paths are not search when thepaths
option is specified.My proposed change is highlighted in bold.
I'd be happy to submit a patch if this proposed change is acceptable.
The text was updated successfully, but these errors were encountered: