dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

ESM modules aren't registered in package.json

Open fabis94 opened this issue 3 years ago • 1 comments

Describe the bug Even though this package comes with an ESM version, it's not clear to me how build tools are supposed to pick up on it, when the ESM modules aren't specified anywhere in the package.json. Out of 'main', 'module' and 'exports' only the 'main' field is filled out and it links to day.min.js, which is not ESM.

Expected behavior Package.json should be updated to point to the modules inside ./esm/ through the module and exports fields

Information irrelevant

fabis94 avatar Aug 12 '22 15:08 fabis94

Hi, it seems to be really a bug and build tools most probably will use it as commonJS module. Can you please create a PR to fix it?

Upd: here is a discussion about esm support: https://github.com/iamkun/dayjs/issues/1765 , https://github.com/iamkun/dayjs/issues/1528

Bykiev avatar Aug 18 '22 17:08 Bykiev