Skip to content

GrumpySailor/webpack-node-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@grumpy/webpack-node-loader

A zero config Webpack loader for loading .node files.

Installing

Run the following command in the project folder to install the package:

npm install --save-dev @grumpy/webpack-node-loader

Add the following rule to your webpack config:

{
  test: /\.node$/,
  loader: '@grumpy/webpack-node-loader'
}

Troubleshooting

Debugging can be enabled by setting the webpack mode to 'development' or setting the debug option to true.

{
  test: /\.node$/,
  loader: '@grumpy/webpack-node-loader',
  options: {
    debug: true
  }
}

When using .node files in electron make sure to enable node integration in the web preferences. Before you do this make sure you familiarize yourself with the Electron Security Recommendations

Example:

{
  webPreferences: {
    nodeIntegration: true,
    nodeIntegrationInWorker: true
  }
}

About

A zero config Webpack loader for loading .node files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published