Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toyobayashi/native-addon-loader
Webpack .node file loader
https://github.com/toyobayashi/native-addon-loader
Last synced: 11 days ago
JSON representation
Webpack .node file loader
- Host: GitHub
- URL: https://github.com/toyobayashi/native-addon-loader
- Owner: toyobayashi
- License: mit
- Created: 2018-05-04T14:47:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-30T02:26:59.000Z (about 5 years ago)
- Last Synced: 2024-10-11T20:58:35.227Z (27 days ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 15
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# native-addon-loader
## Usage
See `test`.
webpack.config
``` js
module.exports = {
// ...
target: 'node', // or 'electron-main'
output: {
path: path.join(__dirname, 'dist'),
filename: 'js/[name].js'
},
// ...
module: {
rules: [
// ...
{
test: /\.node$/,
use: [
{
loader: 'native-addon-loader',
options: {
name: 'relative/to/output/path/[name]-[hash].[ext]', // default: '[name].[ext]'
from: 'js' // default: '.'
}
}
]
}
]
}
}```