iamkun / iamkun/dayjs

ESM modules aren't registered in package.json

Open
#2,025 1 comment 9 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**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

Contributor guide

Open the contributing guide

Research direction

Start by inspecting package.json and the ESM modules under ./esm/. Check how the existing main field points to day.min.js, then verify that the module and exports fields identify the ESM entry points; the work is done when package metadata clearly exposes those modules to build tools.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.