Open aaron61591 opened 5 years ago
Can confirm switching to enforce: 'pre'
corrects the output.
I'm seeing a similar problem with the number of lines being affected by the combination of babel-loader and istanbul-instrumenter-loader. https://github.com/webpack-contrib/istanbul-instrumenter-loader#with-babel suggests enforce: 'post'
which is surprising. I'll try both that and enforce: 'pre'
as seems to have worked for @mcsmcs.
I've tried both post and pre now: https://github.com/GoogleChromeLabs/confluence/pull/403 https://github.com/GoogleChromeLabs/confluence/pull/404
As expected, enforce: 'pre'
is what fixes the line numbering, since the instrumentation is otherwise done on the babel output. I've sent https://github.com/webpack-contrib/istanbul-instrumenter-loader/pull/93 in the hope that it's just a typo in the documentation, but I'm not certain that it is, something else might break?
this is my webpack configuration in karma.conf.js:
html reporter result:
instrumented file like this:
if I update my webpack configuration, and run the instrumentation as a
per
step.everything is ok.