Skip to content
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

Add conditions to require.resolve options #34901

Closed
wclr opened this issue Aug 24, 2020 · 5 comments
Closed

Add conditions to require.resolve options #34901

wclr opened this issue Aug 24, 2020 · 5 comments
Labels
feature request Issues that request new features to be added to Node.js. module Issues and PRs related to the module subsystem. stale

Comments

@wclr
Copy link

wclr commented Aug 24, 2020

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

@PoojaDurgad PoojaDurgad added the esm Issues and PRs related to the ECMAScript Modules implementation. label Oct 22, 2020
@aduh95

This comment has been minimized.

@wclr
Copy link
Author

wclr commented Mar 21, 2021

@aduh95 What is supported?

This issue is about programmatic options of require.resolve, to be able to use conditions while resolving using API:

require.resolve("some/module", { conditions: ... })

@aduh95
Copy link
Contributor

aduh95 commented Mar 21, 2021

Oops, sorry I clearly misread the OP.

@aduh95 aduh95 added feature request Issues that request new features to be added to Node.js. module Issues and PRs related to the module subsystem. and removed esm Issues and PRs related to the ECMAScript Modules implementation. labels Mar 21, 2021
@github-actions
Copy link
Contributor

There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.

For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions
Copy link
Contributor

There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.

For more information on how the project manages feature requests, please consult the feature request management document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. module Issues and PRs related to the module subsystem. stale
Projects
None yet
Development

No branches or pull requests

3 participants