consider adding support for module-sync export condition
Opened this issue · 3 comments
ericallam commented
isaacs commented
So, it looks like, it should point to the ESM version, but that's only safe to do if it doesn't use top level await? Are there other conditions, or a link to the node docs that describe when it's ok to use?
ericallam commented
No Node.js docs out yet, and yes I think you have that correct. It's possible the solution for tshy would just be an option in the tshy config to enable outputting the module-sync
export condition, leaving it up to the user to decide.
isaacs commented
I wonder if we could detect it somehow by parsing the built code? It'd be nice to not have this need to be opt-in.