Skip to content

Commit 8541005

Browse files
authored
Add sourceMap source mapping function.
1 parent 05c36db commit 8541005

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/loader.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ module.exports = function(content, map) {
115115
map = result.map;
116116
if(map.sources) {
117117
map.sources = map.sources.map(function(source) {
118-
return source.split("!").pop().replace(/\\/g, '/');
118+
const output = source.split("!").pop().replace(/\\/g, '/');
119+
if(!query.sourceMapSourcesMapping) return output
120+
return query.sourceMapSourcesMapping(output)
119121
}, this);
120122
map.sourceRoot = "";
121123
}

0 commit comments

Comments
 (0)