We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
var webpack = require("webpack"); webpack({ // configuration }, function(err, stats) { // ... });
var webpack = require("webpack"); var compiler = webpack({ // configuration }); compiler.run(function(err, stats) { // ... }); compiler.watch(/* watchDelay= */200, function(err, stats) { // ... });
The Stats object expose this methods:
Stats
stats.hasErrors
Returns true if there were errors while compiling.
true
stats.hasWarnings
stats.toJson(options)
Return information as json object
You can specify the whished information by the options argument: (Boolean)
options
options.hash add the hash of the compilation
options.hash
options.timings add timing information
options.timings
options.assets add assets information
options.assets
options.chunks add chunk information
options.chunks
options.chunkModules add built modules information to chunk information
options.chunkModules
options.modules add built modules information
options.modules
options.cached add also information about cached (not built) modules
options.cached
options.reasons add information about the reasons why modules are included
options.reasons
options.source add the source code of modules
options.source
options.errorDetails add details to errors (like resolving log)
options.errorDetails
options.modulesSort (string) sort the modules by that field
options.modulesSort
options.chunksSort (string) sort the chunks by that field
options.chunksSort
options.assetsSort (string) sort the assets by that field
options.assetsSort
stats.toString(options)
Returns a formated string of the result.
options are the same as options in toJson.
toJson
options.colors With console colors
options.colors