Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
npm-install-webpack-plugin
Advanced tools
Webpack loader to automatically npm install & save dependencies.
Speed up development by automatically installing & saving dependencies with Webpack.
^v1.12.0
and ^2.1.0-beta.0
..babelrc
plugins & presets.require
, import
)@cycle/dom
)lodash.capitalize
)@import "~bootstrap"
)babel-loader
, file-loader
, etc.)require("bundle?lazy!./App"
)peerDependencies
.
(e.g. @cycle/core
will automatically install rx@*
)resolve.alias
& resolve.root
configuration.
(e.g. require("react")
can alias to react-lite
)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!
$ npm install --save-dev npm-install-webpack-plugin
In your webpack.config.js
:
plugins: [
new NpmInstallPlugin();
],
This is equivalent to:
plugins: [
new NpmInstallPlugin({
// Use --save or --save-dev
dev: false,
// Install missing peerDependencies
peerDependencies: true,
});
],
You can provide a Function
to the dev
to make it dynamic:
plugins: [
new NpmInstallPlugin({
dev: function(module, path) {
return [
"babel-preset-react-hmre",
"webpack-dev-middleware",
"webpack-hot-middleware",
].indexOf(module) !== -1;
},
}),
],
MIT License 2016 © Eric Clemmons
FAQs
Webpack loader to automatically npm install & save dependencies.
The npm package npm-install-webpack-plugin receives a total of 2,184 weekly downloads. As such, npm-install-webpack-plugin popularity was classified as popular.
We found that npm-install-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.