rollup-plugin-jsnative
Rollup plugin to include native .node modules in output JavaScript file (very bad performance)
Installation
npm:
npm i rollup-plugin-jsnative -D
yarn:
yarn add rollup-plugin-jsnative -D
pnpm:
pnpm add rollup-plugin-jsnative -D
Usage
import native from "rollup-plugin-jsnative";
export default {
input: "src/index.js",
output: {
dir: "output",
format: "cjs"
},
plugins: [native()]
};
Options
exclude
Type: String
| Array[...String]
Default: null
A picomatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. By default no files are ignored.
include
Type: String
| Array[...String]
Default: null
A picomatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Exports
generateBootstrap(buff: Buffer)
Returns: string
Accepts buffer of a .node file and returns generated bootstrap.
Information
Resources
Made by Angelo II
Copyright © (C) Angelo II, MIT license.