1.0.0 • Published 5 months ago

rollup-plugin-jsnative v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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.

1.0.0

5 months ago