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-mapv1.0.1Synchronous APINode 12+TypeScript 3.9-7.0
Runs the production browser bundle
Source-map combiner
First generated file
JavaScriptSecond generated file
JavaScriptCombined output
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-mapconst combine = require('combine-source-map');Public contract
Small synchronous API
| API | Purpose | Return |
|---|---|---|
create(file?, sourceRoot?) | Create a combiner | Combiner |
addFile(options, offset?) | Add or rebase one generated file | Combiner |
base64() | Encode the combined map | String |
comment() | Create an inline sourceMappingURL | String |
removeComments(source) | Remove inline and external map comments | String |
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