Open ericallam opened 1 month ago
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?
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.
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.
https://github.com/nodejs/node/pull/54648