dayjs
dayjs copied to clipboard
Package doesn't define module entry points
Describe the bug
The package.json does not define exports as module entry points for better ESM support, see also: https://nodejs.org/api/packages.html#package-entry-points
Expected behavior The build process exports ES modules, but they are not properly exposed. This is particularly important when you want to service ESM in a browser.
The following addition to the package.json file should sove the issue:
{
"exports": {
".": "./esm/index.js",
"./utils": "./esm/utils.js",
"./contant": "./esm/constant.js",
"./locale/*": "./esm/locale/*.js",
"./plugin/*": "./esm/plugin/*.js",
}
}
Information
- Day.js Version latest
- OS: any
- Browser any
- Time zone: 'Europe/Berlin'