Arguments
counter
current rebuild numbertime
time in seconds that spent for rebuildingscripts
all modules that are included in current buildwarnings
array of warnings
Arguments
errors
array of errors
npm install --save webpack-build-logger
By default - plugin provide only event emmiting but auto logging could be configured.
import WebpackBuildLogger form 'webpack-build-logger'
let webpackBuildLogger = new WebpackBuildLogger({
logEnabled: true, // false - default
logger: (counter, time, scripts, warnings) => { // by default - console.log will be used
customLogger(counter, time, scripts, warnings)
}
});
import WebpackBuildLogger form 'webpack-build-logger'
...
webpack.config.plugins.push(new WebpackBuildLogger());
...
let instance = Webpack(config);
instance.on('build.start', () => {
...
});
instance.on('build.done', (counter, time, scripts, warnings) => {
});
instance.on('build.error', (errors) => {
...
});