From 7e16faa202ebc8c38b7f86d6b135f70ce6c7118e Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Tue, 29 Nov 2022 20:18:28 +0900 Subject: [PATCH] doc: disambiguate `native module` to `addon` Signed-off-by: Daeyeon Jeong PR-URL: https://github.com/nodejs/node/pull/45673 Refs: https://github.com/nodejs/node/pull/44135 Reviewed-By: Chengzhong Wu Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung --- doc/api/esm.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 41e116fb777ce9..eab0f3957eee27 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -485,9 +485,9 @@ These CommonJS variables are not available in ES modules. `__filename` and `__dirname` use cases can be replicated via [`import.meta.url`][]. -#### No Native Module Loading +#### No Addon Loading -Native modules are not currently supported with ES module imports. +[Addons][] are not currently supported with ES module imports. They can instead be loaded with [`module.createRequire()`][] or [`process.dlopen`][]. @@ -1539,6 +1539,7 @@ success! [6.1.7 Array Index]: https://tc39.es/ecma262/#integer-index +[Addons]: addons.md [CommonJS]: modules.md [Conditional exports]: packages.md#conditional-exports [Core modules]: modules.md#core-modules