-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Add conditions to require.resolve options #34901
Copy link
Copy link
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.stale
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.stale
Type
Fields
Give feedbackNo fields configured for issues without a type.
There is PR was implemented to support custom user
--conditions#34637
I wonder why not add this param to
require.resolveoptions, which now contains onlypaths, this would allow using require in some custom resolution scenarios, where it is not possible to use cli flag.But also probably it should not fully mimic
--conditionswhich still puts leavesrequireandnodeconditions preferable, but this option should allow overriding the full list of the used condition while resolution.@guybedford