Registry / devops / better-webpack-progress

better-webpack-progress

JSON →
library1.1.0jsnpmunverified

A webpack progress formatter that provides compact, bar, and detailed output modes for the webpack ProgressPlugin. Version 1.1.0 is stable with no recent releases. It is a simple, dependency-free alternative to other progress plugins like simple-progress-webpack-plugin, offering three distinct display modes suitable for development (compact, bar) and CI (detailed) environments.

npm install better-webpack-progress
INSTALL
IMPORT
SIG · BETTER-WEBPACK-PRO
B
better-webpack-progress
devopsjavascriptv1.1.0
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.

betterProgress
const betterProgress = require('better-webpack-progress');
const { default: betterProgress } = require('better-webpack-progress');
CJS default export, not named. ESM import not available.
betterProgress
import betterProgress from 'better-webpack-progress';
import { betterProgress } from 'better-webpack-progress';
Only default export; named import will fail.
betterProgress
betterProgress({ mode: 'compact' })
new betterProgress({ mode: 'compact' })
It's a factory function, not a constructor.

Shows how to integrate better-webpack-progress with webpack's ProgressPlugin in a webpack config.

const webpack = require('webpack'); const betterProgress = require('better-webpack-progress'); module.exports = { plugins: [ new webpack.ProgressPlugin(betterProgress({ mode: 'compact' })), ], }; // Also works with webpack 5: // webpack.ProgressPlugin is available by default.
Debug
Known issues
gotchaThe imported function is a factory that returns a callback; passing it directly as a plugin will fail.
fix
Wrap call: betterProgress({ mode: 'compact' }) returns a function to pass to ProgressPlugin.
affects: >=1.0
gotchaModes 'compact' and 'bar' behave similarly; 'detailed' is intended for CI and does not reuse lines.
fix
Choose mode based on environment: compact/bar for dev, detailed for CI.
affects: >=1.0
gotchaNo ESM export; require() is required for Node.js.
fix
Use CommonJS require. If using ES modules, use createRequire or fallback to dynamic import.
affects: >=1.0
Errors
Common errors & fixes
TypeError: betterProgress is not a function
Importing as named export instead of default.
fix
Use: const betterProgress = require('better-webpack-progress');
Error: `mode` must be one of: compact, bar, detailed
Invalid or missing mode option.
fix
Set mode: 'compact' (or 'bar' or 'detailed') in options object.
Webpack config validation error: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
Passing the factory result directly as a plugin instead of wrapping in ProgressPlugin.
fix
new webpack.ProgressPlugin(betterProgress({ mode: 'compact' }))
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
better-webpack-progress — npm install better-webpack-progress · libregistry