Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

BasixKOR/node-rs-loader

Repository files navigation

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",
      },
    ],
  },
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published