1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-18 20:04:03 -05:00
denoland-deno/tests/testdata/compile/napi/main.ts
Ivancing 3c40457820
fix(cli): add NAPI support in standalone mode (#24642)
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.
2024-07-22 22:48:39 +02:00

7 lines
132 B
TypeScript

import Module from "node:module";
const mod = new Module("");
const filepath = Deno.args[0];
console.log(mod.require(filepath));