Add documentation around using ESM imports
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- documentation
Research direction
Start in the README and review its existing CommonJS import guidance, then compare the issue's proposed ESM examples with the package's documented exports. Update the README with accurate ESM import information and confirm that the examples clearly cover the default import and alias cases.
Written by the indexing model from the issue text.
Description
I ran into an issue with named imports that was similar to #1001, and then I noticed that the README does not include any information on how to import this package using ESM.
Could the README be updated since there are more projects using modules with import/export syntax over commonjs?
Edit: it possibly just needs a reference to use this syntax:
//import comes from the default export
import debug from 'debug';
export default debug('your-package-name')
//With an alias
import {default as debugInitializer} from 'debug';
export default const debug('your-package-name')
- Dominant language
- JavaScript
- Stars
- 11.5k
- Forks
- 992
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from debug-js/debug
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Debug as JSON Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 28/100
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·