Reputation: 75
I want to find exact error in my program, where is error occurring in real time. I have been facing problem to detect error as It only shows bundle file that have thousand no. of lines. That is next to impossible to go through all the code at once. Please provide solution If you have. Thanks in advance...
Upvotes: 5
Views: 4539
Reputation: 299
Where you call webpack function, you can console.log the stats :
webpack(config, function (err, stats) {
if (err) {
console.log(err)
}
console.log(stats.toString())
})
Maybe it could help you
Upvotes: 0
Reputation: 93531
In webpack config file , check debug
is true :
{
debug: true,
devtool: 'source-map',
entry: ...
....
}
Upvotes: 0
Reputation: 190
Please use the devtool option of webpack.
Look at it https://webpack.github.io/docs/configuration.html#devtool
I suggest use eval like below
devtool: debug ? "eval" : null,
It will minimize your code and show you where the error is actually.For more info refer the link i have shared.
Upvotes: 0