We add a mapping for each end of line here:
|
if (chunk.charCodeAt(idx) === NEWLINE_CODE) { |
|
generated.line++; |
|
generated.column = 0; |
|
// Mappings end at eol |
|
if (idx + 1 === length) { |
|
lastOriginalSource = null; |
|
sourceMappingActive = false; |
|
} else if (sourceMappingActive) { |
|
map.addMapping({ |
|
source: original.source, |
|
original: { |
|
line: original.line, |
|
column: original.column, |
|
}, |
|
generated: { |
|
line: generated.line, |
|
column: generated.column, |
|
}, |
|
name: original.name, |
|
}); |
|
} |
|
} else { |
in a project of mine, I overridden this and was not doing this, and the SourceMapConsumer seems to be fine with the sourcemap that is being generated.
We add a mapping for each end of line here:
source-map/lib/source-node.js
Lines 396 to 417 in 4e304db
in a project of mine, I overridden this and was not doing this, and the
SourceMapConsumerseems to be fine with the sourcemap that is being generated.