All Projects → smt116 → Node Native Ext Loader

smt116 / Node Native Ext Loader

Licence: mit
Loader for Node native extensions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Native Ext Loader

Phaser Ce Npm Webpack Typescript Starter Project
Project to get you started with your Phaser-CE (using the npm module) game using Typescript and Webpack for building! No hassle asset management, Google Web Font loader, live server, development vs distribution build pipeline, Electron packaging for desktop builds, and more...
Stars: ✭ 414 (+711.76%)
Mutual labels:  webpack, loader
React Imported Component
✂️📦Bundler-independent solution for SSR-friendly code-splitting
Stars: ✭ 525 (+929.41%)
Mutual labels:  webpack, loader
Vue2 News
基于vue2 + vue-router + vuex 构建的一个新闻类单页面应用 —— 今日头条(移动端)
Stars: ✭ 462 (+805.88%)
Mutual labels:  webpack, native
Typescript Webpack Starter
⚡ create-ts-lib: A Starter Kit and a CLI to create your TypeScript / ES6 module bundled by Webpack without thinking about build or unit tests configurations. 🏠
Stars: ✭ 358 (+601.96%)
Mutual labels:  webpack, npm-package
Thread Loader
Runs the following loaders in a worker pool
Stars: ✭ 945 (+1752.94%)
Mutual labels:  webpack, loader
Sass Loader
Compiles Sass to CSS
Stars: ✭ 3,718 (+7190.2%)
Mutual labels:  webpack, loader
Angular Hmr
🔥 Angular Hot Module Replacement for Hot Module Reloading
Stars: ✭ 490 (+860.78%)
Mutual labels:  webpack, loader
Vue I18n Loader
🌐 vue-i18n loader for custom blocks
Stars: ✭ 229 (+349.02%)
Mutual labels:  webpack, loader
Stylefmt Loader
Webpack-loader. Fixes stylelint issues automatically while bundling with Webpack.
Stars: ✭ 24 (-52.94%)
Mutual labels:  webpack, loader
Bundlephobia
🏋️ Find out the cost of adding a new frontend dependency to your project
Stars: ✭ 6,640 (+12919.61%)
Mutual labels:  webpack, npm-package
Markdown Loader
markdown loader for webpack
Stars: ✭ 335 (+556.86%)
Mutual labels:  webpack, loader
Svgr
Transform SVGs into React components 🦁
Stars: ✭ 8,263 (+16101.96%)
Mutual labels:  webpack, loader
ngx-smart-loader
Smart loader handler to manage loaders everywhere in Angular apps.
Stars: ✭ 28 (-45.1%)
Mutual labels:  loader, npm-package
Css Loader
CSS Loader
Stars: ✭ 4,067 (+7874.51%)
Mutual labels:  webpack, loader
titanium-vue
Use Vue.js to easily create native mobile apps with Axway Appcelerator Titanium.
Stars: ✭ 45 (-11.76%)
Mutual labels:  native, npm-package
Babel Loader
📦 Babel loader for webpack
Stars: ✭ 4,570 (+8860.78%)
Mutual labels:  webpack, loader
Awesome Typescript Loader
Awesome TypeScript loader for webpack
Stars: ✭ 2,357 (+4521.57%)
Mutual labels:  webpack, loader
Style Resources Loader
CSS processor resources loader for webpack
Stars: ✭ 214 (+319.61%)
Mutual labels:  webpack, loader
Wasm Loader
✨ WASM webpack loader
Stars: ✭ 604 (+1084.31%)
Mutual labels:  webpack, loader
Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (-37.25%)
Mutual labels:  webpack, npm-package

Node Native Loader

Package 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 at runtime.

Installation

Add the package to the development dependencies:

# using npm:
$ npm install native-ext-loader --save-dev

# using yarn:
$ yarn add --dev native-ext-loader

Usage

Update rules entry in the Webpack configuration file:

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

Options

Options are configurable using options hash:

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

basePath (default: [])

It allows adjusting path to the native module. The array will be concatenated with the resource name and then used in the runtime. For example, when the compile application lives inside app.asar/renderer subdirectory (Electron package), the path to the native module can be adjusted by using basePath: ['app.asar', 'renderer'].

Note that basePath is ignored when rewritePath option is used.

rewritePath (default: undefined)

It allows to set an absolute paths to native files.

Note that it needs to remain undefined if you are building a package with embedded files. This way, the compiled application will work no matter of its location. This is important when building Electron applications that can be placed in any directory by the end user.

emit (default: true)

Specifies whether the imported .node file will be copied to the output directory.

Releasing a new version

  1. Bump version number in the package.json and CHANGELOG.md files.
  2. Run npm install to update package-lock.json file.
  3. Commit changes (include changes)
  4. Add a new tag (use -a and include changes)
  5. Push commits and tag
  6. Run npm publish
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].