New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for es module exports #1973
Initial support for es module exports #1973
Conversation
@@ -1,4 +1,10 @@ | |||
{ | |||
const browsersList = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to not expose yet the browsersList into package.json. In next pr iteration I'll probably move this.
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"typesVersions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Credits to @andrewbranch, see https://github.com/andrewbranch/example-subpath-exports-ts-compat#strategy-support-matrix. Huge thanks
…to rework-publish-iteration-one
…to rework-publish-iteration-one
@adrai I've tested on few IDE and seems to work fine (at least with a recent typescript version) It's a first step, I tried to not optimize the bundle yet and keep what did exists. On the user side it does not bring improvements (yet) but there's a slight possibility of issues. 2 options:
|
FYI: In a later step, I'd like to introduce rollup 3, completely rework/refresh the babel config, get real es modules (the current esm build is not)... Let me know the approach and if it's fine for you |
I would wait for the feedback regarding the peer dep change first... |
Redone in #1998 |
Rework publishing iteration 1.
Why ?
It paves the way to:
Version
Minor version. Should not break anything.
Risks
Dual packaging is always tricky. There's risks to add the exports field. Out of my mind (not exhaustive):
Next iterations
I'll detail soon. But I see a lot of potential for either size-reduction, either normalization. Other packages i18next, react-i18next will have to be updated too to bring full potential.
Size history
Before:
After:
No size regression