{"id":26652,"library":"webpack-sane-compiler-reporter","title":"webpack-sane-compiler-reporter","description":"A reporter library for the webpack-sane-compiler that provides pretty, customizable console output for webpack compilation events (start, success, failure, invalidate, stats). Version 3.3.2 is the latest stable release. It is designed specifically for webpack-sane-compiler (peer dependency >=2.0.0 <4.0.0) and offers hooks to customize each message type, with defaults that print to stderr. Unlike generic webpack reporters, it integrates tightly with the sane compiler API, supporting features like stats display (true, false, 'once') and fine-grained event-level formatting.","status":"active","version":"3.3.2","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/moxystudio/webpack-sane-compiler-reporter","tags":["javascript","webpack","compiler","compilation","report","reporter","reporting"],"install":[{"cmd":"npm install webpack-sane-compiler-reporter","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-sane-compiler-reporter","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-sane-compiler-reporter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: provides the compiler instance that emits events to report on.","package":"webpack-sane-compiler","optional":false}],"imports":[{"note":"This package exports a single function as default. In CommonJS, use require('webpack-sane-compiler-reporter') and call it.","wrong":"const { startReporting } = require('webpack-sane-compiler-reporter')","symbol":"default","correct":"import startReporting from 'webpack-sane-compiler-reporter'"},{"note":"CommonJS requires the whole module; ES import uses default import, not named.","wrong":"import { startReporting } from 'webpack-sane-compiler-reporter'","symbol":"startReporting","correct":"const startReporting = require('webpack-sane-compiler-reporter');"},{"note":"The function returns an object with 'stop' and 'options'. Destructure both at once.","wrong":"const stop = startReporting(compiler, {}).stop","symbol":"startReporting (returned object)","correct":"const { stop, options } = startReporting(compiler, {/* options */});"}],"quickstart":{"code":"import startReporting from 'webpack-sane-compiler-reporter';\nimport SaneCompiler from 'webpack-sane-compiler';\nimport webpack from 'webpack';\n\nconst config = { /* webpack config */ };\nconst compiler = new SaneCompiler(webpack(config));\n\nconst { stop, options } = startReporting(compiler, { stats: 'once' });\n\ncompiler.run((err, stats) => {\n  if (err) console.error(err);\n  // Reports are printed automatically\n  stop();\n});","lang":"typescript","description":"Shows how to create a SaneCompiler instance, attach the reporter with custom options, and run a compilation."},"warnings":[{"fix":"Update code to destructure stop and options from the return value.","message":"v3.0.0 changed the API: the function now returns { stop, options } instead of just stop.","severity":"breaking","affected_versions":">=3.0.0 <4.0.0"},{"fix":"Replace verbose: true with stats: 'once' or stats: true.","message":"v2.0.0 removed the 'verbose' option; use 'stats' option instead.","severity":"breaking","affected_versions":">=2.0.0 <3.0.0"},{"fix":"Refer to latest documentation; if not confirmed, use the object-style customization.","message":"The 'printStart', 'printSuccess', etc. custom functions are deprecated in favor of a single 'printer' option? (Check docs).","severity":"deprecated","affected_versions":">=3.3.0"},{"fix":"Specify write: (msg) => process.stdout.write(msg) to redirect to stdout.","message":"The reporter prints to stderr by default. To capture output, provide a custom 'write' function.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import startReporting from 'webpack-sane-compiler-reporter' or const startReporting = require('...')","cause":"Using ES import incorrectly: import { startReporting } from '...' instead of default import.","error":"TypeError: startReporting is not a function"},{"fix":"Install the peer dependency: npm install webpack-sane-compiler","cause":"Missing peer dependency 'webpack-sane-compiler'.","error":"Cannot find module 'webpack-sane-compiler'"},{"fix":"Set stats to true, false, or 'once'.","cause":"Provided an invalid value for stats option (e.g., 'verbose').","error":"options.stats should be a boolean or 'once'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}