fix: make sourceMaps relative to the CSS output file#274
fix: make sourceMaps relative to the CSS output file#274wardpeet merged 4 commits intoegoist:masterfrom
Conversation
Now shows relative sourceMappingURL, rather than duplicating the full filePath
Codecov Report
@@ Coverage Diff @@
## master #274 +/- ##
==========================================
- Coverage 92.68% 92.47% -0.21%
==========================================
Files 10 10
Lines 328 319 -9
Branches 115 112 -3
==========================================
- Hits 304 295 -9
Misses 23 23
Partials 1 1
Continue to review full report at Codecov.
|
|
Any development on this? I tested this as a fix for visjs/vis-network#968 and visjs/vis-timeline#621, it resulted in the correct path being emitted. |
|
Tests appear to have failed because of a timeout, rather than any tests failing. |
wardpeet
left a comment
There was a problem hiding this comment.
Sorry for the delay. This seems to work great and makes debugging a little bit easier for custom paths. Thank you for your patience! 🚢
|
🎉 This PR is included in version 3.1.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
For the example in:
test/fixtures/dist/extract--custom-path/this/is/extracted.cssthe sourceMappingURL was:
/*# sourceMappingURL=this/is/extracted.css.map */Meaning the browser would try and load the sourcemap from:
this/is/this/is/extracted.css.mapThis only happens when someone has set
extractto something likethis/is/extracted.css.I've changed this to run the map name through path.basename first, as the map is always dropped in the same folder as the css file.