Source Map v3 composition

@stackline/combine-source-map

Combine generated files and embedded source maps through the familiar synchronous API, modern mapping traversal, portable paths, and first-party types.

npm install @stackline/combine-source-map
v1.0.1Synchronous APINode 12+TypeScript 3.9-7.0

Runs the production browser bundle

Source-map combiner

First generated file

JavaScript

Second generated file

JavaScript

Combined output


        
Ready2 source files0 mapped sources

Lowest-change migration

Keep the original import name

Use an npm alias when existing build code requires combine-source-map.

npm install combine-source-map@npm:@stackline/combine-source-map
const combine = require('combine-source-map');

Public contract

Small synchronous API

Full reference
APIPurposeReturn
create(file?, sourceRoot?)Create a combinerCombiner
addFile(options, offset?)Add or rebase one generated fileCombiner
base64()Encode the combined mapString
comment()Create an inline sourceMappingURLString
removeComments(source)Remove inline and external map commentsString

Release evidence

Composition is measured

13
focused regression tests
5
differential upstream scenarios
99%+
line coverage
12-24
tested Node.js range

Machine-readable documentation

AI and crawler resources

#Stackline #SourceMaps #JavaScript #OpenSource #NPM #AIReadyDocs