
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
hops-plugin
Advanced tools
This package is deprecated. Please use hops and hops-build instead.
Hops assumes you will write an Express-style middleware, transpiles it and makes it easy to use in non-transpiled and even non-server code. Hops' plugin is a simple helper to simplify using your custom middleware in a Webpack build.
You can override hops' default Webpack configuration by passing a config object to the Plugin constructor. Supported config options equal those supported in package.json.
If you want to use your Webpack build to generate static pages using your own custom Express middleware, written in ECMAScript and transpiled using Webpack, this plugin might be what you're looking for. Phew.
This example shows how to write and configure a custom middleware and use it in a webpack plugin that will generate two html files (foo/index.html and bar/index.html) in the webpack output folder.
package.json{
...
"server": "src/server.js"
...
}
src/server.jsexport default (req, res) => {
switch (req.url) {
case '/foo':
res.write('hello foo');
break;
case '/bar':
res.write('hello bar');
break;
default:
res.writeHead(404);
res.write('not found');
break;
}
res.end();
};
webpack.config.jsconst HopsPlugin = require('hops-plugin');
const webpackConfig = require('hops-build-config').nodeConfig;
const locations = ['foo', 'bar'];
module.exports = {
...
plugins: [
new HopsPlugin(locations, webpackConfig /*, watchOptions */)
]
...
}
FAQs
Hops Webpack plugin using Webpack to render HTML
The npm package hops-plugin receives a total of 0 weekly downloads. As such, hops-plugin popularity was classified as not popular.
We found that hops-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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.