Skip to content

toyobayashi/native-addon-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

native-addon-loader

Usage

See test.

webpack.config

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: '.'
            }
          }
        ]
      }
    ]
  }
}

About

Webpack .node file loader

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published