Socket
Socket
Sign inDemoInstall

native-ext-loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-ext-loader

Loader for Node native extensions


Version published
Weekly downloads
1.2K
decreased by-5.26%
Maintainers
1
Weekly downloads
 
Created
Source

Node Native Loader

Module for loading native files in Node and Electron applications. The project is inspired by the node-addon-loader. It works in the similar way but allows to build path in the runtime.

Install

Add the package to the package.json file:

$ yarn add --dev native-ext-loader

Usage

Update webpack.config.js file's rules:

module: {
  rules: [
    test: /\.node$/,
    loader: 'native-ext-loader'
  ]
}

Options

It is possible to adjust options:

module: {
  rules: [
    test: /\.node$/,
    loader: 'native-ext-loader',
    options: {
      name: '[hex].[ext]',
      rewritePath: path.resolve(__dirname, 'dist')
    }
  ]
}

name

This option allows to change the file name in the output directory. You can use all placeholders defined in the loader-utils package.

rewritePath

This options allows to set an absolute path. Note that it needs to remain undefined if you are building a package with embedded files.

Keywords

FAQs

Package last updated on 01 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc