Registry / devops / webpack-nicelog

webpack-nicelog

JSON →
library2.3.1jsnpmunverified

A webpack plugin that provides a prettier, colorful console output during and after webpack compilation. The current stable version is 2.3.1, with an older maintenance cadence (last update 2018). It replaces the default webpack build logs with a nicer formatted display, including optional progress bar, build time, and configurable colors and display name. Differentiators include simplicity and zero-config setup, though it is less maintained compared to alternatives like webpack-dashboard or friendly-errors-webpack-plugin. No dependencies required for basic use.

npm install webpack-nicelog
INSTALL
IMPORT
SIG · WEBPACK-NICELOG
W
webpack-nicelog
devopsjavascriptv2.3.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

WebpackNiceLog
const WebpackNiceLog = require('webpack-nicelog')
const { WebpackNiceLog } = require('webpack-nicelog')
The package exports a single constructor function, not a named export.
WebpackNiceLog
import WebpackNiceLog from 'webpack-nicelog'
import { WebpackNiceLog } from 'webpack-nicelog'
ESM import works in Node >=12 with type:module or appropriate bundler config. The default export is the class.

Configures webpack-nicelog with a custom display name, green color, screen clearing, and build time display.

// webpack.config.js const WebpackNiceLog = require('webpack-nicelog'); module.exports = { entry: './src/index.js', output: { filename: 'bundle.js', path: __dirname + '/dist' }, plugins: [ new WebpackNiceLog({ name: 'MyApp', color: '#00ff00', clearScreen: true, skipBuildTime: false }) ] };
Debug
Known issues
deprecatedPackage has not been updated since 2018 and may not work with webpack 5+. Consider using webpack's built-in 'infrastructureLogging' options.
fix
Switch to webpack's 'infrastructureLogging.level' or use alternatives like 'webpack-dashboard'.
affects: >=5.0.0
gotchaThe 'clearScreen' option may cause flickering in some terminal environments (e.g., Windows CMD, CI systems).
fix
Set 'clearScreen: false' or ensure terminal compatibility.
affects: all
gotchaWhen using webpack 5, the plugin might not suppress other log output correctly, resulting in duplicate messages.
fix
Set webpack's 'stats' configuration to minimal or use 'infrastructureLogging' to reduce noise.
affects: >=5.0.0
deprecatedThe 'onDone' option callback signature uses the old webpack stats object format. In webpack 5, the stats object properties have changed.
fix
Update callback to handle stats object changes, such as using 'stats.toJson()'.
affects: >=5.0.0
gotchaThe 'color' option does not validate hex input; invalid strings may be silently ignored or cause errors.
fix
Provide a valid web color name or hex code (e.g., '#ff0000').
affects: all
Errors
Common errors & fixes
TypeError: WebpackNiceLog is not a constructor
Incorrect import style - using named import instead of default.
fix
Use 'const WebpackNiceLog = require('webpack-nicelog')' or 'import WebpackNiceLog from 'webpack-nicelog''.
Error: Cannot find module 'webpack-nicelog'
Package not installed or missing from node_modules.
fix
Run 'npm install webpack-nicelog --save-dev' or 'yarn add webpack-nicelog --dev'.
TypeError: Invalid or unexpected token
Using ES2015+ syntax (e.g., import/export) without appropriate Babel/Node version support.
fix
If using ESM, ensure Node >=12 and add 'type': 'module' to package.json, or use CommonJS require.
TypeError: Cannot read property 'compilation' of undefined
Plugin used in an incompatible webpack version (e.g., webpack 5 API changes).
fix
Upgrade to a compatible webpack version or use alternative logging plugin.
Upgrade
Version history
2.3.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
webpack-nicelog — npm install webpack-nicelog · libregistry