You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's, indeed, a very good question.
I believe you are right, a named export is unecessary here (given the module only exports a single function).
As removing the named export would be a breaking change, I am wondering if having both a named and a default export a good idea ... Any opinion on this?
I believe this would work
It would certainly work - would only add few bytes to CJS file and none for ESM consumers (thanks to tree-shaking in bundlers, ofc ESM will come to node some time in the future, but those extra few bytes shouldnt be much of a concern there).
For CJS consumers it would mean that both of those would be allowed:
as in the title 😉
The text was updated successfully, but these errors were encountered: