Skip to content

Add conditions to require.resolve options #34901

Description

@wclr

There is PR was implemented to support custom user --conditions
#34637

I wonder why not add this param to require.resolve options, which now contains only paths, 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 --conditions which still puts leaves require and node conditions preferable, but this option should allow overriding the full list of the used condition while resolution.

@guybedford

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.moduleIssues and PRs related to the module subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions