Registry / devops / done-webpack-plugin

done-webpack-plugin

JSON →
library1.0.3jsnpmunverified

A webpack plugin that registers a callback to be executed when the compiler's 'done' hook is triggered, providing access to compilation stats. Version 1.0.3 is the current stable release. It offers a simple API with optional error callback, distinct from webpack's built-in hooks or other plugin-based approaches.

npm install done-webpack-plugin
INSTALL
IMPORT
SIG · DONE-WEBPACK-PLUGI
D
done-webpack-plugin
devopsjavascriptv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DoneWebpackPlugin (default)
const DoneWebpackPlugin = require('done-webpack-plugin');
import { DoneWebpackPlugin } from 'done-webpack-plugin';
Package is CJS-only; use require, not named import.
new DoneWebpackPlugin(callback)
new DoneWebpackPlugin((stats) => { ... })
new DoneWebpackPlugin().onDone(stats => { ... })
The plugin expects constructor arguments, not method calls.
Error callback
new DoneWebpackPlugin(successCb, errorCb)
new DoneWebpackPlugin(errorCb, successCb)
Order is success callback first, then error callback.

Shows basic usage with success and error callbacks in webpack config.

// webpack.config.js const DoneWebpackPlugin = require('done-webpack-plugin'); module.exports = { plugins: [ new DoneWebpackPlugin( (stats) => { console.log('Build finished in', stats.endTime - stats.startTime, 'ms'); }, (err) => { console.error('Build error:', err); } ) ] };
Debug
Known issues
breakingRequires webpack 4 or later; uses webpack 4's hooks API.
fix
Upgrade to webpack 4+.
affects: <1.0.0
deprecatedPackage is not actively maintained; last update was in 2018.
fix
Consider using webpack's built-in 'done' hook or a more modern alternative.
affects: all
gotchaError callback is not called for compiler errors; only for plugin internal errors.
fix
Use webpack's 'error' stats or handle errors in the success callback via stats.hasErrors().
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: DoneWebpackPlugin is not a constructor
ESM import instead of require.
fix
Use `const DoneWebpackPlugin = require('done-webpack-plugin');` instead of import.
Error: Cannot find module 'webpack'
Missing webpack as a peer dependency.
fix
Run `npm install --save-dev webpack` or ensure webpack is installed.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
done-webpack-plugin — npm install done-webpack-plugin · libregistry