Index: lib/src/compiler/compiler.dart |
diff --git a/lib/src/compiler/compiler.dart b/lib/src/compiler/compiler.dart |
index d9b6b9630283595e72a25147f74b18daa4671e59..e8b5a1697b3d16b7e2086ec0983e701b40156952 100644 |
--- a/lib/src/compiler/compiler.dart |
+++ b/lib/src/compiler/compiler.dart |
@@ -363,12 +363,14 @@ class JSModuleFile { |
new JS.Printer(opts, printer, localNamer: new JS.TemporaryNamer(tree))); |
if (options.sourceMap && options.sourceMapComment) { |
- printer.emit('\n//# sourceMappingURL=$mapUrl\n'); |
+ // Assume these are in the same directory and use relative paths. |
Jennifer Messerly
2016/08/26 23:06:37
I don't understand why we need this assumption. Ca
vsm
2016/08/26 23:19:48
Done.
|
+ assert(path.dirname(jsUrl) == path.dirname(mapUrl)); |
+ printer.emit('\n//# sourceMappingURL=${path.basename(mapUrl)}\n'); |
} |
Map builtMap; |
if (sourceMap != null) { |
- builtMap = placeSourceMap(sourceMap.build(jsUrl), mapUrl); |
+ builtMap = placeSourceMap(sourceMap.build(path.basename(jsUrl)), mapUrl); |
Jennifer Messerly
2016/08/26 23:06:37
here too, I don't see why this is needed, the whol
vsm
2016/08/26 23:19:48
done - see below.
|
} |
return new JSModuleCode(printer.getText(), builtMap); |
} |