This repository was archived by the owner on Jun 28, 2025. It is now read-only.
This repository was archived by the owner on Jun 28, 2025. It is now read-only.
Empty source map causes sources to be unset #116
Closed
Description
When combining source maps, and one of the maps is empty, the sources array is empty afterwards.
[
{
version: 3,
names: [],
sources: [ '..path/to/$layout.svelte' ],
sourcesContent: [ '<p>asd</p>\r\n' ],
mappings: ';;;;;;;'
},
{
version: 3,
mappings: 'AAAA,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;',
names: [],
sources: [ '$layout.svelte' ]
}
]
It produces { version: 3, mappings: ';;;;;;;', names: [], sources: [] }
(note the empty sources array. Mappings is also empty, not sure if that is intended).
Digging into the source code, I think that in this function the combination is done, and the line where sources
is updated is never reached in case of empty mappings.
Metadata
Metadata
Assignees
Labels
No labels