Description
There are a few issues open from users complaining about the current state of the docs:
- Crarify which versions support package.json:"type":"module" node#33143
- Improve documentation on Dual Module Packages node#34515
- Imply ES6 module package, when package.json contanis 'module':... node#34027
- I have probably missed other ones…
I have two open PRs (nodejs/node#32970 and nodejs/node#33512) on node's repo trying to find another angle, and I'd like to thank @guybedford, @GeoffreyBooth and others who reviewed them. However, both approaches have failed and a discussion have initiated about a third attempt.
I think Node.js would benefit from getting more feedback before committing to a structure for this part of the docs, and this WG felt the right place to do so.
Currently there are two pages that deal with modules:
However there is no apparent logic on where a user can find documentation about features which a neither CJS nor ESM specific (package.json
fields, package authoring, SourceMap support, the module
core module, …).
In nodejs/node#33512 (comment), it was suggested that we could use something like:
- Modules: CommonJS modules
- Modules: ECMAScript modules
- Modules:
Package authoringconfigurationPackages - Modules:
module
core moduleAPI (including Source map v3 docs) Modules: Source map v3 support (or could be moved to Debugger page)
The Modules:
prefix is there to make sure those entries will appear next to one another in the TOC. What are your thoughts?
EDIT: I've included the suggestions from this thread (there are 3 comments at the time of edit).