-
Notifications
You must be signed in to change notification settings - Fork 64
No source map support #7
Comments
afaik there is no source maps support gotwarlost/istanbul#212 + karma-runner/karma-coverage#109, so there is nothing to return from the loader. btw, are you sure that you really need source maps in case of code coverage? |
Fair point. Well, I use the same webpack config for development and testing. Maybe I should split that out instead. The source maps I need for development, but the coverage I want as part of testing. So having to comment out the instrumenter or provide a ENV variable is a bit cumbersome. But yeah, I don't need source maps when doing coverage, feel free to close this issue. The true thing for me to do is have my test environment load a different webpack config than my local environment. |
usually I have 3 webpack configs inherited from "common" one: build, dev and test. so maybe it's a good moment to start splitting :) |
I think the sourcemap is now used to remap covered JS code back to original source it was transpiled from. With babel, typescript & angular 2 this is becoming a must have feature. See
|
+1 - new |
Pass the intermediate source map to the instrumenter that can be used to remap the coverage report to the original source. Requires istanbuljs-archived-repos/istanbul-lib-instrument#23. Fixes webpack-contrib#22, webpack-contrib#7, karma-runner/karma-coverage#109,
* Upgrade to istanbul-lib-instrument * Pass intermediate source map to instrumenter Pass the intermediate source map to the instrumenter that can be used to remap the coverage report to the original source. Requires istanbuljs-archived-repos/istanbul-lib-instrument#23. Fixes #22, #7, karma-runner/karma-coverage#109,
When using this as a post loader in my webpack config:
It ends up destroying source maps:
devtool: 'source-map',
For now my work around is to do
Which works for when I want it to do coverage from my CI environment, but makes it so it's slightly more difficult to get coverage locally.
The text was updated successfully, but these errors were encountered: