Replies: 2 comments 2 replies
-
I did find this however: Perhaps it is supported? but not documented anywhere officially? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, this has been supported for several releases already - you can use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I couldn't find any documentation about this on:
Node.js now supports a feature called conditional exports:
Would be cool if there was support for a
deno
export, such that I could write code that specifically has a different export for Nodenode
, Denodeno
, Browsersimport
, and legacy Noderequire
/default
For instance, my
start-of-week
package writes different code for each target, so it would definitely use this. Currently it is using boundation with editions to achieve the conditional loading, however now that Node.js has its own official convention, I am planning to adopt that instead for all my packages.Beta Was this translation helpful? Give feedback.
All reactions