From 8c728d2f0236f82cf8bb51f054d91d6dbb29dca4 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 9571bb11e8fef4..d67cb47abe526e 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -486,9 +486,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`][]. @@ -1525,6 +1525,7 @@ for ESM specifiers is [commonjs-extension-resolution-loader][]. [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