-
Notifications
You must be signed in to change notification settings - Fork 63
feat: add fixWebpackSourcePath option (options.fixWebpackSourcePath
)
#70
base: master
Are you sure you want to change the base?
Conversation
75e88bd
to
25e8619
Compare
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
===========================================
- Coverage 92.3% 76.47% -15.84%
===========================================
Files 2 2
Lines 13 17 +4
Branches 2 3 +1
===========================================
+ Hits 12 13 +1
- Misses 1 4 +3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
+ Coverage 92.3% 94.44% +2.13%
==========================================
Files 2 2
Lines 13 18 +5
Branches 2 3 +1
==========================================
+ Hits 12 17 +5
Misses 1 1
Continue to review full report at Codecov.
|
I've added a test, but I was not yet able to find a minimal webpack config that causes the paths to be wrong |
4d90038
to
7cd2ec7
Compare
options.fixWebpackSourcePath
)
Can you please give a small example? |
I think a cleaner solution to this may be to change the path that is passed to istanbul, currently |
@michael-ciniawsky I was not able to find a minimal example, I just know that the problem surfaces in my webpack boilerplate @mattlewis92 I am not familiar with the webpack API, I just know that this PR fixes the issue (https://github.com/cyclejs-community/one-fits-all/blob/a1bd1cb67759628e6d29f0c89221c1f44b5f69cd/configs/webpack.config.test.js#L21) |
this.request = 'loader-1!loader-2!loader-n!./path/to/file?query'
this.resource = 'path/to/file?query'
this.resourcePath = 'path//to/file'
this.resourceQuery = 'query' Please post a before after example of the |
Weird, the bug is not reproducable any more. Neither Webpack 2 nor Webpack 3 produce this error any more, I guess I can close this then. On the other hand, the bug was there, I got the error message:
|
Did you initially use |
No, 100% either 2.X or 3.X, most likely 3.X |
kk, please provide e.g a Gist or the like with before/after comparison in case it should still happen in one of your projects, so we can triage and finalize the PR here. I'm blocking it meanwhile. In case your issue is resolved and this isn't needed anymore (in your opinion) please close the PR. |
I just tried all beta releases of my boilerplate and was not able reproduce the bug. I will close for now, if the problem surfaces again I can repopen |
This issue just resurfaced in my boilerplate. You can see it yourself by running these commands:
after that, open |
7cd2ec7
to
c9e99a8
Compare
After a bit of digging, I found this in the instrumenter output: inputSourceMap: {
version: 3,
file: "/home/jan/temp/name/src/components/speaker.tsx",
sourceRoot: "/home/jan/temp/name/",
sources: [
"node_modules/.registry.npmjs.org/tslint-loader/3.6.0/node_modules/tslint-loader/index.js!/home/jan/temp/name/src/components/speaker.tsx"
],
names: [],
mappings: <redacted>,
sourcesContent: [<redacted>]
} |
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
+ Coverage 92.3% 94.44% +2.13%
==========================================
Files 2 2
Lines 13 18 +5
Branches 2 3 +1
==========================================
+ Hits 12 17 +5
Misses 1 1
Continue to review full report at Codecov.
|
No idea why the tests fail, locally they pass just fine |
I also tested my boilerplate with a temporary release of my fork, and it does indeed fix the issue as expected |
This allows to use the
fixWebpackSourcePath
option without karma.Issues