mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
4e8f5875bc
Currently, importing Node-Addons modules in a standalone binary results in a `missing symbol called` error (https://github.com/denoland/deno/issues/24614). Because the NAPI symbols are not exported in this mode. This PR should fix the issue.
7 lines
132 B
TypeScript
7 lines
132 B
TypeScript
import Module from "node:module";
|
|
|
|
const mod = new Module("");
|
|
|
|
const filepath = Deno.args[0];
|
|
|
|
console.log(mod.require(filepath));
|