webpack-isomorphic-compiler-reporter
raw JSON → 1.3.3 verified Fri May 01 auth: no javascript
A pretty reporting library for webpack-isomorphic-compiler (v1.3.3) that provides beautiful, isomorphic-aware console output during compilation events. It builds on webpack-sane-compiler-reporter but adds complete support for isomorphic compilation. No major recent releases; maintenance mode likely. Key differentiator: designed specifically for isomorphic webpack setups where client and server compilers are combined.
Common errors
error Cannot find module 'webpack-isomorphic-compiler-reporter' ↓
cause Package not installed or not in node_modules.
fix
npm install webpack-isomorphic-compiler-reporter --save-dev
error TypeError: startReporting is not a function ↓
cause Using ES import syntax incorrectly; the default export is a function but import expects a default interop.
fix
const startReporting = require('webpack-isomorphic-compiler-reporter');
Warnings
gotcha Package is CJS-only; do not use ES import syntax without interop. ↓
fix Use require() or a CJS-compatible bundler transform.
deprecated webpack-isomorphic-compiler may be deprecated in favor of modern solutions like webpack 5 built-in HMR. ↓
fix Consider migrating to webpack 5 or other isomorphic approaches.
Install
npm install webpack-isomorphic-compiler-reporter yarn add webpack-isomorphic-compiler-reporter pnpm add webpack-isomorphic-compiler-reporter Imports
- default wrong
import startReporting from 'webpack-isomorphic-compiler-reporter';correctconst startReporting = require('webpack-isomorphic-compiler-reporter'); - startReporting wrong
const { stop, options } = startReporting.default(compiler, options);correctconst { stop, options } = startReporting(compiler, options);
Quickstart
const startReporting = require('webpack-isomorphic-compiler-reporter');
const IsomorphicCompiler = require('webpack-isomorphic-compiler');
const webpackConfigClient = { /* client config */ };
const webpackConfigServer = { /* server config */ };
const compiler = new IsomorphicCompiler(webpackConfigClient, webpackConfigServer);
// Start reporting
const { stop } = startReporting(compiler, {
stats: 'once',
humanErrors: true,
});
// Trigger compilation
compiler.run((err, stats) => {
if (err) console.error(err);
// stop reporting when done
stop();
});