All changes are restricted to the esm build file, to avoid changing the upgrade/maintenance process.
Doing so also happens to be the extremely lazy/easy way of doing things: we dynamically import the ESM file that was just generated by the ESM build, we enumerate all of the objects in the default export, append this to the string contents of the ESM file, and rewrite the file.
This results in the addition of the following at the end of the file:
Adds named exports to ESM build.
All changes are restricted to the esm build file, to avoid changing the upgrade/maintenance process.
Doing so also happens to be the extremely lazy/easy way of doing things: we dynamically import the ESM file that was just generated by the ESM build, we enumerate all of the objects in the default export, append this to the string contents of the ESM file, and rewrite the file.
This results in the addition of the following at the end of the file:
I have tested this and it seems to be working. If this is not merged, consider changing the README, whose example implies named exports: