Skip to content

webpack plugin that allows to injects dependencies into the empty package.json that bozon creates in its builds folder

Notifications You must be signed in to change notification settings

ceonizm/BozonPackageDependencyInjectorPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

BozonPackageDependencyInjectorPlugin

webpack plugin that allows to injects dependencies into the empty package.json that bozon creates in its builds folder

its main purpose is to allow the copy of a list of native modules that are not packed by webpack

parameters

an object containeing the following properties

  • src (fs.PathLike): the path to the folder containing the source package.json (usually ".")
  • dest (fs.PathLike): the path to the folder containing the destination package.json (usually "build/production")
  • dependencies (string[]): a list of dependencies that must be referenced in the source package

usage

  const BozonInjecterPlugin = require('./BozonPackageDependencyInjector');
  const mode = 'production';
  module.exports = {
  main: {
    externals: {
      "node-hid" : 'commonjs node-hid'
    },
    entry: './src/main/index.js',
    plugins:[
      new BozonInjecterPlugin({ src: ".", dest: `./builds/${mode}`, dependencies:[
          'node-hid'
        ]})
    ]
  }
  }

About

webpack plugin that allows to injects dependencies into the empty package.json that bozon creates in its builds folder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published