Skip to content

Commit

Permalink
Merge pull request #547 from dleffler/master
Browse files Browse the repository at this point in the history
Fix/restore working source map generation in 0.7.3
  • Loading branch information
robocoder authored Dec 21, 2017
2 parents b373570 + 045f308 commit 22ae510
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/SourceMap/SourceMapGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,19 @@ public function generateJson()
$root = $this->options['sourceRoot'];

if ($root) {
$sourceMap['names'] = array();
$sourceMap['sourceRoot'] = $root;
}

// A list of original sources used by the 'mappings' entry.
$sourceMap['sources'] = array();

foreach ($this->sources as $source_uri => $source_filename) {
$sourceMap['sources'][] = $this->normalizeFilename($source_filename);
}

// A list of symbol names used by the 'mappings' entry.
$sourceMap['names'] = array();

// A string with the encoded mapping data.
$sourceMap['mappings'] = $mappings;

Expand Down

0 comments on commit 22ae510

Please sign in to comment.