$ gnpm install @node-rs/helper
@node-rs/helper
Helper library for load native package.
Load native binding file from dirname
loadBinding(dirname: string, filename?: string = 'index', packageName?: string): string
dirname
, dirname which the .node binding file located
filename
, the napi.name
filed in you package.json
packageName
, the name
filed in your package.json
, @swc/core
for example.
return native module
const { loadBinding } = require('@node-rs/helper')
module.exports = loadBinding(__dirname, 'swc', '@swc/core')
Copyright 2013 - present © cnpmjs.org | Home |