Index: sdk/lib/_internal/pub/lib/src/dart.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart |
index cc9146f307f5c928b4d96d1e095b6760b543a567..7da4b172def7809d4e25f9a772d3792f2b7db6a6 100644 |
--- a/sdk/lib/_internal/pub/lib/src/dart.dart |
+++ b/sdk/lib/_internal/pub/lib/src/dart.dart |
@@ -11,6 +11,7 @@ import 'dart:isolate'; |
import 'package:analyzer/analyzer.dart'; |
import 'package:path/path.dart' as path; |
import 'package:stack_trace/stack_trace.dart'; |
+ |
import '../../../compiler/compiler.dart' as compiler; |
import '../../../compiler/implementation/filenames.dart' |
show appendSlash; |
@@ -74,6 +75,11 @@ Future compile(String entrypoint, CompilerProvider provider, { |
if (terse) options.add('--terse'); |
if (toDart) options.add('--output-type=dart'); |
+ // Add the source map URLs. |
+ var sourceUrl = path.toUri(entrypoint); |
+ options.add("--out=$sourceUrl.js"); |
+ options.add("--source-map=$sourceUrl.js.map"); |
+ |
if (environment == null) environment = {}; |
if (commandLineOptions != null) options.addAll(commandLineOptions); |