Node Add-ons for webpack
npm install --save-dev node-loader
Executes node add-ons in enhanced-require.
Use the loader either via your webpack config, CLI or inline.
##
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.node$/,
use: 'node-loader'
}
]
}
}
In your application
import node from 'file.node';
webpack --module-bind 'node=node-loader'
In your application
import node from 'file.node';
In your application
import node from 'node-loader!./file.node';
Juho Vepsäläinen |
Joshua Wiens |
Kees Kluskens |
Sean Larkin |