Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
WebpackEventPlugin
✓ const WebpackEventPlugin = require('webpack-event-plugin')
✗ import WebpackEventPlugin from 'webpack-event-plugin'
Package does not provide ESM exports; use CommonJS require.
WebpackEventPlugin
✓ new WebpackEventPlugin([{ hook: 'done', callback: () => {} }])
✗ new WebpackEventPlugin({ hook: 'done', callback: () => {} })
Constructor expects an array of hook configs, not a single object.
WebpackEventPlugin
✓ // in webpack config plugins array
plugins: [new WebpackEventPlugin(...)]
✗ // applied to compiler after compile
compiler.hooks.done.tap('Plugin', new WebpackEventPlugin(...))
Must be used as a plugin in webpack's plugins array, not tapped manually.
Shows WebpackEventPlugin with afterEmit and done hooks in a webpack config.
const WebpackEventPlugin = require('webpack-event-plugin');
module.exports = {
// ... other webpack config
plugins: [
new WebpackEventPlugin([
{
hook: 'afterEmit',
callback: (compilation) => {
console.log('Build complete! Assets emitted.');
}
},
{
hook: 'done',
callback: (stats) => {
console.log(`Build finished in ${stats.endTime - stats.startTime}ms`);
}
}
])
]
};
Errors
Common errors & fixes
TypeError: compiler.hooks[this.hook] is not a function
Hook name is not a valid webpack compiler hook or is misspelled.
fixUse only hook names from webpack compiler hooks (e.g., 'done', 'afterEmit').
Error: Hook is not defined
Hook name does not exist on compiler.hooks.
fixCheck webpack version: compiler hooks changed between versions. Use compatible hook names.
TypeError: WebpackEventPlugin is not a constructor
Trying to import ES module style with import or misspelling the plugin name.
fixUse require('webpack-event-plugin') and ensure correct spelling. Audit
Dependencies
No dependency data recorded yet.