Skip to content

Commit 1e862d7

Browse files
committed
Fix/restore working source map generation in 0.7.3
1 parent b373570 commit 1e862d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SourceMap/SourceMapGenerator.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,17 @@ public function generateJson()
174174
$root = $this->options['sourceRoot'];
175175

176176
if ($root) {
177+
// $sourceMap['sourceRoot'] = $root;
178+
// A list of symbol names used by the 'mappings' entry.
177179
$sourceMap['names'] = array();
178180
}
179181

182+
// A list of original sources used by the 'mappings' entry.
183+
$sourceMap['sources'] = array();
184+
foreach($this->sources as $source_uri => $source_filename) {
185+
$sourceMap['sources'][] = $this->normalizeFilename($source_filename);
186+
}
187+
180188
// A string with the encoded mapping data.
181189
$sourceMap['mappings'] = $mappings;
182190

0 commit comments

Comments
 (0)