Package Exports
- @node-rs/helper
- @node-rs/helper/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@node-rs/helper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@node-rs/helper
Helper library for load native package.
Usage
locateBinding
Load native binding file from dirname
loadBinding(dirname: string, filename?: string = 'index', packageName?: string): string
dirname
, dirname which the .node binding file locatedfilename
, thenapi.name
filed in youpackage.json
packageName
, thename
filed in yourpackage.json
,@swc/core
for example.return native module
const { loadBinding } = require('@node-rs/helper')
module.exports = loadBinding(__dirname, 'swc', '@swc/core')