Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-install-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-install-webpack-plugin

Webpack loader to automatically npm install & save dependencies.

  • 3.1.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm-install-webpack-plugin

Speed up development by automatically installing & saving dependencies with Webpack.

npm-install-webpack-plugin mp4

Features

  • Works with both Webpack ^v1.12.0 and ^2.1.0-beta.0.
  • Auto-installs .babelrc plugins & presets.
  • Supports both ES5 & ES6 Modules. (e.g. require, import)
  • Supports Namespaced packages. (e.g. @cycle/dom)
  • Supports Dot-delimited packages. (e.g. lodash.capitalize)
  • Supports CSS imports. (e.g. @import "~bootstrap")
  • Supports Webpack loaders. (e.g. babel-loader, file-loader, etc.)
  • Supports inline Webpack loaders. (e.g. require("bundle?lazy!./App")
  • Auto-installs missing peerDependencies. (e.g. @cycle/core will automatically install rx@*)
  • Supports Webpack's resolve.alias & resolve.root configuration. (e.g. require("react") can alias to react-lite)

travis build Coverage Status version downloads MIT License


Why?

It sucks to Ctrl-C your build script & server just to install a dependency you didn't know you needed until now.

Instead, use require or import how you normally would and npm install will happen automatically to install & save missing dependencies while you work!

Installation

$ npm install --save-dev npm-install-webpack-plugin

Usage

In your webpack.config.js:

plugins: [
  new NpmInstallPlugin(),
],

If you have an .npmrc file in your project, those arguments will be used:

save=true
save-exact=true

Alternatively, you can provide your own arguments to npm install:

plugins: [
  new NpmInstallPlugin({
    ...
    cacheMin: 999999  // --cache-min=999999 (prefer NPM cached version)
    registry: "..."   // --registry="..."
    save: true,       // --save
    saveDev: true,    // --save-dev
    saveExact: true,  // --save-exact
    ...
  }),
],

License

MIT License 2016 © Eric Clemmons

Keywords

FAQs

Package last updated on 13 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc