-
Improvement
-
Resolution: Unresolved
-
Major
-
4.2.0
-
None
-
None
-
2 - Long term
-
3 - Complex
Problem
When JSASS generates the source map of a sass file, it can generate multiple mapping for the same line.
For example, when using a mixing, there can be one mapping on the mixin call, and one mapping inside the mixin, pointing to the same outputted minimized css line and column
When aggregating such source maps with SourceMapGeneratorV3 (from closure jar), used for js and css minimization, only one mapping to the corresponding line/column is kept.
Same example as previously : only the mapping pointing inside the mixin is kept, the mapping information to the mixin call is lost.
Possible workaround
We could read the source map mapping before aggregating, choosing between multiple mapping to the same line/column by keeping the most pertinente one, for example "the first mapping" or "the last mapping", and generate the source map with the filtered mapping to give to SourceMapGeneratorV3