Skip to content

Commit

Permalink
fixed source name on source map (#7)
Browse files Browse the repository at this point in the history
* fixed source name on source map

* fixed source name on source map

* remove unused dependency
  • Loading branch information
rerodrigues authored and adascal committed Oct 18, 2019
1 parent 8020a1f commit 9046d2e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tasks/terser.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ module.exports = function(grunt) {
return true;
}
})
.map(function(filepath) {
.reduce(function (sources, filepath) {
// Read file source.
return grunt.file.read(filepath);
})
.join(';');
var fileContent = grunt.file.read(filepath);

return {
...sources, [filepath]: fileContent
};
}, {});

// Minify file code.
var result = Terser.minify(src, options);
Expand Down

0 comments on commit 9046d2e

Please sign in to comment.