Reputation: 19829
I'm trying to determine what is taking my webpack build so long. I'm struggling to find any logging options or debug options so webpack will log information about what its doing... I've looked around and seen a couple things like the noInfo: false option but that doesnt do anything for me...
I'm uing the node.js api. Here's an example:
var compiler = webpack(config)
compiler.run(function(err, stats) {
if (err) {
console.error(err)
return
} else {
fs.writeFileSync(path.join(root, 'webpack', 'stats.'+projectName+'.json'), stats.toJson(), 'utf8')
console.log("done: stats."+projectName+'.json')
}
});
Upvotes: 23
Views: 7561
Reputation: 1474
Although an old question, it's useful to know that new plugins have been released to help track down performance bottlenecks.
For example, you could try using something like the Speed Measure Webpack Plugin to see how long different loaders and plugins are taking to run in your configuration
Upvotes: 9