diff --git a/packages/source-map-utils/index.js b/packages/source-map-utils/index.js index 64da0223c38..df13bae6105 100644 --- a/packages/source-map-utils/index.js +++ b/packages/source-map-utils/index.js @@ -29,6 +29,9 @@ var SourceMapUtils = { } for (let i = 0; i < Buffer.from(character).length; i++) { + //because our character offsets here are in bytes, we need to + //pad out the line/column map as per the UTF-8 length of the + //characters so we're mapping *bytes* to line/columns mapping.push(loc); } column += 1;