
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
hops-plugin
Advanced tools
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 3 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.