Closed Andarist closed 1 year ago
Wow, thanks!
@manuelbieh I meant to add some more comments but had to go away from the computer before I could do that 😅 so here we go:
I think that the current setup is still not quite OK:
package.json#module
points to es
directory and that contains CJS files. This should point ESM files - but also keep in mind that package.json#module
isn't "standard". It's a field only understood by bundlers - it's still pretty popular and its semantics are somewhat well-defined.require
+default
conditions here. Both could be merged into just default~ (and that could allow for "collapsing" the whole "."
entry to just ".": "./es/index.js"
). Right now the default contains a reference to an UMD bundle but that seems to be pretty redundant to me. All in all, I just wanted to fix a specific problem here - without introducing too many changes at once but this setup, imho, could use some further work.
@manuelbieh would there be a chance to cut a new release with this small fix?
Hey. I'll look into that. It should have actually been released via CI. Don't know why this didn't happen. I will check 😉
:tada: This PR is included in version 3.3.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their
exports
this way so the bug can be fixed in TypeScript.You can check the reported error here