Files
node/doc/api
Joyee Cheung 943b1edb3c doc: correct module loading descriptions
The existing description is outdated, and exposes too many details
that are subject to change.

- There is no point conceptualizing "two module loaders", in reality
  the boundary is blurred since the two invoke each other to support
  require(esm) and import(cjs). The distinction lies not in
  what kind of module is being requested/which loader is used, but
  only in how the the module request is initiated (via `require()`
  or `import()`). The inner working of the loaders are subject
  to change and not suitable to be documented.
- It should not mention monkey patching in the documentation, as
  publicly supported universal hooks are already provided through
  `module.registerHooks()`, and so there's no need to single out
  any of them in terms of loader hooks support either.
- Remove the description about whether they are asynchronous or
  synchronous, which is also implementation detail subject to change.
- Add missing descriptions about how .ts, .mts and .cts are treated,
  and `.node` is also supported in import now.
- There is no need to specially mention .node treatment in cli.md,
  link to the explanations about loading from `import` in packages.md
  instead.

PR-URL: https://github.com/nodejs/node/pull/60346
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2025-10-31 20:30:23 +00:00
..
2025-10-28 20:03:00 +01:00
2025-10-16 08:17:53 +00:00
2025-07-15 17:18:42 +00:00
2025-06-09 23:45:29 +02:00
2025-07-15 17:18:42 +00:00
2024-11-01 03:43:53 +00:00
2025-07-28 20:03:37 +00:00
2025-10-15 13:27:47 -03:00
2025-10-28 20:03:00 +01:00
2025-07-28 20:03:37 +00:00
2025-08-28 23:08:02 +02:00
2025-07-15 17:18:42 +00:00
2025-07-15 17:18:42 +00:00
2025-08-29 02:24:57 +00:00
2025-07-15 17:18:42 +00:00
2025-07-15 17:18:42 +00:00
2025-06-09 23:45:29 +02:00
2025-07-15 17:18:42 +00:00
2025-07-15 17:18:42 +00:00
2025-10-15 13:27:47 -03:00
2025-10-21 01:45:50 +02:00
2025-07-15 17:18:42 +00:00