Files
node/doc/api
Joyee Cheung 64e13fd36e doc: fix transpiler loader hooks documentation
The loader hooks examples have been broken for a while:

1. The nextLoad() hook cannot be used on a .coffee file that ends
   up going to the default load step without an explict format,
   which would cause a ERR_UNKNOWN_FILE_EXTENSION. Mention
   adding a package.json with a type field to work around it
   in the example.
2. Pass the context parameter to the nextLoad() invocation and
   document that context.format is mandatory when module type
   is not explicitly inferrable from the module.
3. Correct the getPackageType() implementation which returns
   false instead of undefined in the absence of an explict format,
   which is not a valid type for format.

PR-URL: https://github.com/nodejs/node/pull/57037
Refs: https://github.com/nodejs/node/issues/57030
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-17 10:50:56 -03:00
..
2024-03-18 14:27:59 +00:00
2025-01-05 13:05:31 -05:00
2024-08-14 08:15:00 +02:00
2023-04-23 13:34:08 +00:00
2024-11-27 11:03:27 -05:00
2025-04-16 03:29:16 -03:00
2025-04-16 03:28:04 -03:00
2024-10-16 16:11:47 +02:00
2024-08-25 18:19:06 -03:00
2025-02-03 20:09:52 +01:00
2025-01-06 10:57:22 -05:00
2024-09-17 11:18:27 -03:00
2025-01-30 19:20:38 +01:00
2024-11-27 11:03:32 -05:00
2025-01-05 12:57:24 -05:00
2025-01-05 13:05:31 -05:00
2025-01-05 12:57:23 -05:00
2025-01-30 19:20:38 +01:00
2025-01-05 12:57:24 -05:00
2024-08-05 11:15:41 -03:00