rollup-plugin-jsnative
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i rollup-plugin-jsnative

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.29 kB

Total Files

5

Last publish

Collaborators

  • angelocore