Description
I read https://nodejs.org/api/esm.html and found that while it had good/exhaustive coverage of import
, it doesn't describe how to export
a module. Unless I very much missed it, there is not even a single example of a ESM module.
I know, import
and export
are part of the language base, and node's documentation doesn't cover the Javascript language. In this case, I think its necessary to at least have a single example, such as:
export function whatever() {};
export function somethingElse() {};
export default {
whatever,
somethingElse,
};
Not having this makes the import docs hard to understand, they talk a lot about "exports" and "default exports", but without defining them.
Also, having read through ~600 lines of documentation on ECMAscript modules and still having to scrape the internet to figure out how to write one is not a great documentation experience :-).
- Version: master/12
- Platform: any
- Subsystem: doc