Registry / devops / webpack-stylish

webpack-stylish

JSON →
library0.1.8jsnpmunverified

A stylish, opinionated reporter for webpack that replaces the default build output with a visually appealing, easy-to-read format. Version 0.1.8 supports webpack 2, 3, and 4. It ignores the stats config and works best with a single instance for MultiCompiler setups. Requires Node >=6. No options; opinionated defaults. Compared to alternatives like webpack-dashboard or friendly-errors-webpack-plugin, it focuses purely on output aesthetics with minimal configuration.

npm install webpack-stylish
INSTALL
IMPORT
SIG · WEBPACK-STYLISH
W
webpack-stylish
devopsjavascriptv0.1.8
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

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

default
✓ const Stylish = require('webpack-stylish');
✗ import Stylish from 'webpack-stylish';
Package does not ship ESM; use CommonJS require.
default (ESM)
✓ const Stylish = require('webpack-stylish');
✗ import Stylish from 'webpack-stylish';
No ESM export; must use require.
instance usage
✓ new Stylish()
Constructor returns a plugin instance. No options.

Basic webpack config with webpack-stylish plugin replacing default stats output.

const path = require('path'); const webpack = require('webpack'); const Stylish = require('webpack-stylish'); module.exports = { context: path.resolve(__dirname), devtool: 'source-map', entry: './entry.js', output: { filename: './output.js', path: path.resolve(__dirname), }, plugins: [ new webpack.NamedModulesPlugin(), new Stylish(), ], };
Debug
Known issues
gotchawebpack-stylish ignores the `stats` config property entirely.
fix
Do not set `stats` in webpack config; if using webpack-cli, set `stats: 'none'` to avoid duplicate output.
affects: *
breakingRequires webpack 2, 3, or 4; not compatible with webpack 5.
fix
Upgrade to a webpack 5 compatible alternative or stick with webpack 4.
affects: *
gotchaSome loaders/plugins (e.g., stylelint-webpack-plugin) push multiple errors as one, causing wonky output.
fix
Use a single shared instance for MultiCompiler; otherwise duplicate output.
affects: *
breakingNode.js version <6 is not supported.
fix
Upgrade Node.js to >=6.
affects: <6
Errors
Common errors & fixes
Error: Cannot find module 'webpack-stylish'
Package not installed or incorrect import path.
fix
Run `npm install webpack-stylish --save-dev` and ensure require path matches.
TypeError: Stylish is not a constructor
Using ESM import syntax on a CommonJS module.
fix
Use `const Stylish = require('webpack-stylish');` instead of `import`.
Duplicate output shown in terminal
Using webpack-cli without setting stats: 'none', or multiple instances per MultiCompiler.
fix
Add `stats: 'none'` to config, and share a single Stylish instance across all compiler configs.
Upgrade
Version history
0.1.8latest on npm
Audit
Dependencies
webpackrequiredpeer dependency required to hook into compilation
Agent activity
10 hits · last 30 days
node
10
Resources
webpack-stylish — npm install webpack-stylish · libregistry