-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does the require.resolve paths
option work just like the baseDir
option?
#188
Comments
Since it's relatively new, this package hasn't adapted to it yet, no. Would you be willing to make a PR with test cases, comparing require.resolve's paths option to the basedir option? Another possibility might be, adding a (do you need the GLOBAL_FOLDERS? requiring things from there is widely considered an antipattern) |
I don't mind taking a stab at it. I don't personally use |
I somehow can't get the normal test suite to run in |
Installed in |
As far as I can see, no where in the current tests do you validate that |
Not that I know of; I've always found that a bit confusing but haven't taken the time to fix it. It sounds like there's a few action items here:
Thoughts? |
|
@watson are you interested in doing any of the steps I outlined above? |
I've added bullet point 2 in 067db38. If you could give me some examples of test cases for |
Since Node.js v8.9.0, a new
paths
option was made available to the core Node.jsrequire.resolve
function:As far as I can see, if just given a single element in the
paths
array, this works identical to thebaseDir
option of this module. The newpaths
features does however take into account theGLOBAL_FOLDERS
, which I'm not sure if this module does?I ask because I would like to feature detect this and use the internal Node.js function if available, but fall back to this module if not. But I wasn't sure if the behavior was 100% identical 🤔
The text was updated successfully, but these errors were encountered: