Registry / devops / webpack-messages

webpack-messages

JSON →
library2.0.4jsnpmunverified

A Webpack plugin that formats and displays messages throughout the bundle lifecycle, including compile start, success, warnings, and errors. Version 2.0.4 is the current stable release, compatible with Webpack 3.x and 4.x. It uses kleur for colorization and provides hooks for custom loggers and completion callbacks. Unlike similar plugins, it supports named bundles for multi-compiler setups and has a minimal footprint. Releases are infrequent but address critical compatibility issues and deprecation warnings.

npm install webpack-messages
INSTALL
IMPORT
SIG · WEBPACK-MESSAGES
W
webpack-messages
devopsjavascriptv2.0.4
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.

WebpackMessages
const WebpackMessages = require('webpack-messages');
import WebpackMessages from 'webpack-messages'; or const { WebpackMessages } = require('webpack-messages');
The package exports a single constructor function, not a named export. Use CommonJS require with default.
WebpackMessages
const WebpackMessages = require('webpack-messages');
const WebpackMessages = require('webpack-messages').default;
In v2, the default export is the constructor itself. No .default property.
WebpackMessages
// In TypeScript, use require or install @types/webpack-messages
Works with CommonJS only; no ES module export.
No TypeScript types shipped; install @types/webpack-messages if needed.

Adds WebpackMessages plugin to Webpack config with custom logger and bundle name.

// webpack.config.js const WebpackMessages = require('webpack-messages'); module.exports = { entry: './src/index.js', output: { filename: 'bundle.js' }, plugins: [ new WebpackMessages({ name: 'client', logger: str => console.log(`>> ${str}`) }) ] };
Debug
Known issues
breakingv2.0.0 dropped support for Node <6. If you need older Node, stick with v1.x.
fix
Use Node >=6 or downgrade to v1.0.x.
affects: >=2.0.0
breakingv2.0.0 replaced chalk with ansi-colors and then later switched to kleur. If you rely on color customization via chalk, it may not work.
fix
Use v1.x if you need chalk compatibility.
affects: >=2.0.0
gotchaThe package uses CommonJS only; importing via ES module 'import' will fail in bundlers that enforce ESM.
fix
Use require('webpack-messages') or configure bundler to allow CJS.
affects: >=1.0.0
deprecatedSwitched from 'compilation' to 'compile' event in v1.0.1. If using a plugin that re-triggers compilation (e.g., Hot Module Replacement), onStart might fire multiple times.
fix
Update to v1.0.1+.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: WebpackMessages is not a constructor
Importing the package as a named export instead of default.
fix
Use const WebpackMessages = require('webpack-messages'); not const { WebpackMessages } = require('webpack-messages');
Error: Cannot find module 'webpack-format-messages'
Missing peer dependency when installing with npm@3 or older.
fix
Make sure webpack-format-messages is installed: npm install webpack-messages webpack-format-messages
Upgrade
Version history
2.0.4latest on npm
Audit
Dependencies
kleurrequiredUsed for colorized output
webpack-format-messagesrequiredProvides message formatting logic
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
webpack-messages — npm install webpack-messages · libregistry