-
Notifications
You must be signed in to change notification settings - Fork 168
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
fix: fix esm #1148
fix: fix esm #1148
Conversation
@remidewitte please test 7.2.3-alpha.0
|
Many thanks. I can confirm it now works for ESM 🎉 ! As for Typescript, I confirm I manage to use it using : |
@remidewitte Perfect 🙏 Please stay on this alpha until next official release |
Tomorrow morning JST I’ll take a peek! |
target: ['es2020', 'node16'], | ||
dts: false, | ||
minify: false, | ||
sourcemap: false, |
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 don't know if it is relevant but I guess it would be useful to keep :
- bundle: false
- sourcemap: true
- dts: true
It would ease the programmatic usage of the lib.
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.
dts
is done in it's own step
Line 10 in 0dacf09
"build:types": "tsc --project tsconfig.build.json", |
bundle and sourcemaps is currently only configured in this way for esm, not for cjs
So I plan to export everything needed from dist/index and depend on tree-shaking instead
But this will only be a breaking changes for users switching to esm anyway
I will drop cjs support in a later major
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.
Excellent !
ee23320
to
7d8b57e
Compare
As @remidewitte told this is working together with #1150, I will merge this and potential fixes can be done in a later PR |
Sorry, I didn't end up looking at it—after a quick scan I don't think my input would be super helpful anyway since I don't know enough without further research into what acrobatics are necessary to satisfy ESM, as I don't actively use it in my projects myself, but I trust your manual testing! |
@osdiab No problem there with that you don't know better about ESM |
closes #1147