json-joy icon indicating copy to clipboard operation
json-joy copied to clipboard

ESM format is not available since version 13

Open sd-git opened this issue 1 year ago • 5 comments

After upgrading from version 11 I noticed missing directories (es6, es2020, esm) from the package distibution.

According to the code this was changed in the build of json-joy since version 13, what was the reason?

We were using json-joy 'esm' format along with Angular. After uprading to version 16 of json-joy, now we have to use '/lib', which is commonJS and Angular build gives complaints about potential optimization issues with 'commonJS library'.

Is there a way to fix this or any plans to provide esm as an option for json-joy package?

Thank you!

sd-git avatar May 23 '24 14:05 sd-git

Hey! The reason for removing it was to simplify the build process and reduce the size of the downloaded NPM package. The idea was that ESM artifacts were not used much, if at all. But since you are bringing up this issue, it might have been not the case (we resume producing ESM artifacts in the future).

streamich avatar May 26 '24 09:05 streamich

Thank you!

sd-git avatar May 28 '24 11:05 sd-git

Hey, I would like to second the request to add back the esm artifacts to the published package

iyefrat avatar Jul 13 '24 17:07 iyefrat

Hey! The reason for removing it was to simplify the build process and reduce the size of the downloaded NPM package. The idea was that ESM artifacts were not used much, if at all. But since you are bringing up this issue, it might have been not the case (we resume producing ESM artifacts in the future).

I thought ESM is the modern format of the future? Isn't every library migrating to a ESM-only build?

macmillen avatar Aug 05 '24 12:08 macmillen

Yes, pretty please support ecmascript modules again 🙏 . This just broke my library that depends json-joy. It also likely will break anyone using modern browser features such as import maps.

superchris avatar Sep 20 '24 21:09 superchris