1.0.2 • Published 5 years ago

npm-install-local-webpack-plugin v1.0.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
5 years ago

NPM Install Local Package Webpack Plugin

From Developers for Developers.

Installation

npm i npm-install-webpack-plugin -D

or

npm i npm-install-webpack-plugin --save-dev

Usage

// webpack.config.js

const NPMInstallWebpackPlugin = require('npm-install-webpack-plugin');

const isDev = process.env.NODE_ENV

const plugins = () => {
  const plugins = []

  //...

  if (isDev)
    plugins.push(
      new NPMInstallWebpackPlugin({
        package: 'local package dir. For example ./NPMInstallWebpackPlugin'
      })
    )

  // ...

  return plugins
}

module.exports = {
  entry: {/* ... */},
  output: {/* ... */},
  plugins: plugins()
}
1.0.2

5 years ago

1.0.1

5 years ago