hook-webpack-plugin weekly downloads statistics
By AlexisPuga · npm · Webpack plugins
A hook injector designed for your webpack config.
hook-webpack-plugin has 27 recorded weekly downloads on npm, a decrease of 22.9% over the past 30 days, ranking #2934 of 3,247 tracked listings.
About hook-webpack-plugin
Hook - webpack plugin
Create custom plugins from your config file and avoid loosing time finding or maintaining a simple plugin.
Intercept any plugin and customize it to match your preferences.
Group your hooks to create a new plugin and modify it when you want.
Contents
Installation
<a href='https://npmjs.org/package/hook-webpack-plugin'><img align='right' src='https://nodei.co/npm/hook-webpack-plugin.png?compact=true' alt='NPM'/></a>
Via npm:
npm i hook-webpack-plugin
Via yarn:
yarn add hook-webpack-plugin --dev
Usage
Add something like the following to your config file, in the plugin section:
// webpack.config.js
const HookWebpackPlugin = require('hook-webpack-plugin');
// ...
plugins: [
// ...
new HookWebpackPlugin(hookName, hookFn, options)
// ...
]
// ...
Then, replace the following values:
<dl> <dt><var>hookName</var>: string</dt> <dd>The name of a <a href='https://webpack.js.org/api/compiler-hooks/' target='_blank'/>compiler</a>/<a href='https://webpack.js.org/api/compilation-hooks/' target='_blank'>compilation</a> hook. <i>Something like "emit", "done", ...</i></dd> <dt><var>hookFn</var>: function</dt> <dd>The listener for the hook.</dd> <dt><var>options</var>: object<sub>opt</sub></dt> <dd> <table> <thead> <tr> <th>Property</th> <th>Default</th> <th>Description</th> </tr> </thead> <tbody> <tr> <th>sync</th> <td>false [async when possible]</td> <td>If a truthy value is given use `tap`, otherwise use `tapAsync`.</td> </tr> <tr> <th>pluginName</th> <td>HookWebpackPlugin</td> <td>Value to use in tap/tapAsync methods.</td> </tr> </tbody> </table> </dd> </dl>Examples
Creating a plugin
// webpack.config.js
plugins: [
new HookWebpackPlugin(hookName, compilerHook (...args) {
// Do something awesome...
})
]
Registering a plugin
Name your plugin and group multiple hooks together, internally.
// webpack.config.js
plugins: [
new HookWebpackPlugin(hookName, compilerHook, {pluginName: 'MyAwesomePlugin'}),
new HookWebpackPlugin(anotherHookName, anotherCompilerHook, {pluginName: 'MyAwesomePlugin'})
]
Intercepting another plugin
Set the pluginName option to the internal name of the plugin you want to intercept.
// webpack.config.js
plugins: [
new ThirdPartyPlugin(options),
new HookWebpackPlugin(hookName, () => {
// Your code...
}, {'pluginName': 'ThirdPartyPlugin'})
]
More info
Check the docs for more details.
License
hook-webpack-plugin is MIT licensed.
Description from the npm listing.
- webpack-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (142)Similar npm Webpack plugins plugins
All 20 hook-webpack-plugin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/hook-webpack-plugin. First seen Nov 10, 2026; last successful collection Nov 24, 2026. See the methodology.