-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Add conditions to require.resolve options #34901
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
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