ESM-only
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 32.7k
- Forks
- 1.4k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Description
## Feature request
### What are you trying to achieve?
Reduce the package size by switching to ESM-only.
### When you searched for similar feature requests, what did you find that might be related?
Followup to #2981.
### What would you expect the API to look like?
I think support for CJS projects is probably a must for a project like Sharp, so it can't just be migrated to ESM-only because of dynamic imports. So it would need a change in the API (breaking change), like `sharp = await loadSharp()`.
### What alternatives have you considered?
Keep ESM+CJS. Problem: increase in size, files are duplicated.
### Please provide sample image(s) that help explain this feature
Contributor guide
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.
Research direction
Review the related discussion in issue #2981 and the ESM/CJS and dynamic-import constraints described here. Clarify the proposed breaking API and migration scope, including how CJS projects would be supported. Done would require an agreed design before implementation begins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100