@basixjs/node-rs-loader

0.0.2-next • Public • Published

node-rs-loader

This loader replaces @node-rs/helper with own implementation to incorporate Rust-based native modules with Webpack.

Usage

Enabling this loader on packages powered by @node-rs/helper will resolve its native modules using node-rs-loader. It is your resposiblity to handle .node files. Usually node-loader is a good choice.

module.exports = {
  target: "node",
  node: {
    __dirname: false,
  },
  module: {
    rules: [
      {
        test: ['@node-rs/bcrypt'].map(m => require.resolve(m)),
        loader: "@basixjs/node-rs-loader",
      },
      {
        test: /\.node$/,
        loader: "node-loader",
      },
    ],
  },
};

Readme

Keywords

none

Package Sidebar

Install

npm i @basixjs/node-rs-loader

Weekly Downloads

15

Version

0.0.2-next

License

none

Unpacked Size

31.3 kB

Total Files

12

Last publish

Collaborators

  • rtyu1120