npm-auto-install-webpack-plugin

Auto installing missing dependencies in package.json before webpack compilation step

Usage no npm install needed!

<script type="module">
  import npmAutoInstallWebpackPlugin from 'https://cdn.skypack.dev/npm-auto-install-webpack-plugin';
</script>

README

npm-auto-install-webpack-plugin

Auto installing missing dependencies in package.json before webpack compilation step

Version Travis CI Quality Coverage Dependencies Gitter

Installation

npm i --save npm-auto-install-webpack-plugin

Usage

webpack.config.babel.js

import NpmAutoInstallWebpackPlugin from "npm-auto-install-webpack-plugin";

export default {
  plugins: [
    new UnusedFilesWebpackPlugin(options),
  ],
};

webpack.config.js

const { NpmAutoInstallWebpackPlugin } = require("npm-auto-install-webpack-plugin");

module.exports = {
  plugins: [
    new NpmAutoInstallWebpackPlugin(options),
  ],
};

Options

new NpmAutoInstallWebpackPlugin(options)

options.disabled

Disable auto-installing missing dependencies with the command.

  • Default: false

options.useYarn

If true, it will use yarn add for installing dependencies instead of npm install.

  • Default: false

Contributing

devDependency Status

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request