Create an explainer / hub page for unflagged require(ESM) support
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 165
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 2
Description
Enter your suggestions in details:
The new unflagged require(ESM) support in Node.js is very exciting. It's starting to let a lot of tools move to ESM without feat of leaving dependents behind. 🚀
But, there isn't one single high-level, official resource I can find that users can be pointed to to understand the unflagged support.
- https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/ is not official. It feels weird pointing folks to a third party platform. It also has a lot of details on historical context and decision-making that users who just want to learn the high level of the feature wouldn't want to have to read through. (it is a great blog post on its own though!)
- https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require is very technical and dives into the weeds of the module system.
Proposal: can the Node.js site have a page added dedicated to the unflagged require(ESM) support? I'd imagine it could contain:
- What "require(ESM)" is
- Quick examples of requiring an ES module from a CJS file
- What versions of Node.js have it
- Edit:
^20.19.0 || >=22.12.0seems to be the common support target post-18.x
- Edit:
- Quick FAQs such as TLA being unsupported
- Links to learn more on the official Node.js website
Sibling issue to nodejs/learn#34, intentionally with as similar an issue body as possible.
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
Start by reviewing the existing Node.js modules documentation, especially the “Loading ECMAScript modules using require” section, and compare it with the proposed high-level scope. Done means adding an official explainer or hub page covering what require(ESM) is, quick CommonJS examples, supported Node.js versions, FAQs such as TLA limitations, and links to related official resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100