fix: remove sourceURL from emitted CSS#1487
Conversation
|
Can you create reproducible example using pure webpack, because I can't get two |
|
@alexander-akait all you need to do is enable sourcemaps in sass-loader. Here's an example A |
In this case the `sourceURL` is not needed as the entire sourcemap which contains all the information is being embedded. Multiple `sourceURL` is also causing issues when in Chrome devtools. See: angular/angular-cli#24414 for more information.
5ec4fdb to
05c3699
Compare
Codecov ReportBase: 96.82% // Head: 96.81% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1487 +/- ##
==========================================
- Coverage 96.82% 96.81% -0.01%
==========================================
Files 12 12
Lines 1133 1131 -2
Branches 412 411 -1
==========================================
- Hits 1097 1095 -2
Misses 27 27
Partials 9 9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
alexander-akait
left a comment
There was a problem hiding this comment.
I am afraid it can break a logic for developer without sass-loader and less-loader (i.e. just pure CSS), why do not disable generation of sourceURL on sass-loader side?
|
hm, maybe you are right, I looked at code and found we already built-in source map: and then duplicate: Not sure why we are doing it, I want to look at github history and found why it was implemented |
|
Correct, I did look into the git history before doing the PR to see the reasoning behind this. But I didn’t find anything meaningful. It looks like it was implemented like this from the beginning. |
|
@alan-agius4 That is really strange, no one reports about it before 😃 |
|
@alan-agius4 6da7e90, looks like it was implemented for |
|
Okay, let's merge and release, I think it should not break the logic, because we really have the same in |
|
Thanks @alexander-akait |
This PR contains a:
Motivation / Use-Case
In this case the
sourceURLis not needed as the entire sourcemap which cotains all the information is being embeeded.Multiple
sourceURLis also causing issues when in Chrome devtools.Additional Info
See: angular/angular-cli#24414 for more information.