node icon indicating copy to clipboard operation
node copied to clipboard

esm: add experimental support for addon modules

Open legendecas opened this issue 3 months ago • 4 comments

Add experimental support to loading .node extension modules in ESM.

An addon exports two names default and module.exports, as same as import(cjs) where its export names can not be preparsed. Addon export names can not be inferred until it is evaluated.

Fixes: https://github.com/nodejs/node/issues/40541 Fixes: https://github.com/nodejs/node/issues/55821

legendecas avatar Nov 14 '24 01:11 legendecas