Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
native-ext-loader
Advanced tools
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.
Add the package to the development dependencies:
# using npm:
$ npm install native-ext-loader --save-dev
# using yarn:
$ yarn add --dev native-ext-loader
Update rules entry in the Webpack configuration file:
module: {
rules: [
{
test: /\.node$/,
loader: "native-ext-loader"
}
];
}
Options are configurable using options
hash:
module: {
rules: [
{
test: /\.node$/,
loader: "native-ext-loader",
options: {
rewritePath: path.resolve(__dirname, "dist")
}
}
];
}
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.
package.json
and CHANGELOG.md
files.npm install
to update package-lock.json
file.-a
and include changes)npm publish
2.1.0
rewritePath
FAQs
Loader for Node native extensions
The npm package native-ext-loader receives a total of 987 weekly downloads. As such, native-ext-loader popularity was classified as not popular.
We found that native-ext-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.