Google chrome logs indicating xml.js:30 instead of actual line

65 views Asked by At

I'm using react v15.6.1 and webpack v1.13.1 and bundle my stuff to a file and it's usually no problem. But now for the last hours or so whenever I get an error or just log something and look at the console in google chrome every log and error is said to come from row 30 in xml.js, which is a file I haven't even created myself. Testing it out on Firefox it all works normally but not in chrome for some reason. Any ideas?

1

There are 1 answers

0
Andy On BEST ANSWER

Try adding a source map to your webpack bundle config.

webpack.dev.config.js:

const config = {

    devtool: 'source-map',

    ..
}

See: https://webpack.github.io/docs/configuration.html#devtool

Related question: React debug in browser when using bundle.js