Created
December 24, 2020 22:07
-
-
Save vit1251/d96eaa38f0a5e260f2fbea84da265ebd to your computer and use it in GitHub Desktop.
Import N-API extension in Node module source code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createRequire } from 'module'; | |
const require = createRequire(import.meta.url); | |
const addon = require('YOUR_ADDON_PATH'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment