{"library":"rollup-plugin-natives","title":"rollup-plugin-natives","description":"A Rollup plugin that extracts native .node files from the bundle and copies them to a specified directory, with options for renaming, mapping, and using dlopen or createRequire for ESM. Current stable version is 0.7.8. Released on npm, maintained by @danielgindi. Differentiates from other Rollup native module plugins by supporting node-pre-gyp and bindings integration, providing originTransform for dynamic path resolution, and offering flexible copying and naming via map functions.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-natives"],"cli":null},"imports":["import nativePlugin from 'rollup-plugin-natives';","import { default as nativePlugin } from 'rollup-plugin-natives';","import type { Options } from 'rollup-plugin-natives';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport nativePlugin from 'rollup-plugin-natives';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'cjs'\n  },\n  plugins: [\n    nativePlugin({\n      copyTo: 'dist/libs',\n      destDir: './libs',\n      dlopen: false,\n      targetEsm: false,\n      sourcemap: true\n    })\n  ]\n};\n","lang":"javascript","description":"Basic Rollup config that extracts native .node files to dist/libs and rewrites requires to point there.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}