Previously the resolve hook can be invoked twice from the synthetic module evaluation step of imported CJS in the extra module._load() call that's invoked on the resolved full path. Add an option to avoid it, since the resolution and loading has already been done before. PR-URL: https://github.com/nodejs/node/pull/61529 Fixes: https://github.com/nodejs/node/issues/57125 Refs: https://github.com/nodejs/node/issues/55808 Refs: https://github.com/nodejs/node/issues/56241 Reviewed-By: Jacob Smith <jacob@frende.me>
1 line
20 B
JavaScript
1 line
20 B
JavaScript
exports.value = 42;
|