@samitouri / QOS-React-2 / commits / 35e24759f1

fix sourcemap filenames when using transformWithDetails. Fixes #3140

Oiva Eskola committed Feb 16, 2015 at 22:21 UTC 35e24759f1e947eaed49b6ab729cdf69292549fa
1 file changed +6
main.js
+6
@@ -26,6 +26,9 @@ module.exports = {
26 if (options && options.sourceMap) {
27 result.sourceMap = output.sourceMap.toJSON();
28 }
29 + if (options && options.sourceFilename) {
30 + result.sourceMap.sources = [options.sourceFilename];
31 + }
32 return result;
33 }
34 };
@@ -46,6 +49,9 @@ function innerTransform(input, options) {
49 }
50
51 var visitorList = visitors.getVisitorsBySet(visitorSets);
52 + if (options.sourceFilename) {
53 + options.filename = options.sourceFilename;
54 + }
55 return transform(visitorList, input, options);
56 }
57