You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm working on a package that depends on the WebCrypto API, and I'd like to use require('node:crypto').webcrypto conditionally on Node.js environments.
Although my use case is quite a niche, I think using conditional exports enables useful things that weren't possible before: using N-API bindings on Node.js, providing Node.js-specific APIs and more.
Would you consider adding this feature? I'm not sure about the design, but I'm thinking something like a constant with the matched condition.
The text was updated successfully, but these errors were encountered:
Hey! Would you like to elaborate a bit with more code snippet for the example? Like what kind of condition exports and how will be it used on consumer side?
Hello! I'm working on a package that depends on the WebCrypto API, and I'd like to use
require('node:crypto').webcrypto
conditionally on Node.js environments.Although my use case is quite a niche, I think using conditional exports enables useful things that weren't possible before: using N-API bindings on Node.js, providing Node.js-specific APIs and more.
Would you consider adding this feature? I'm not sure about the design, but I'm thinking something like a constant with the matched condition.
The text was updated successfully, but these errors were encountered: