File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
lib/src/runner/browser/compilers Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 33* Restrict to latest version of analyzer package.
44* Require Dart 3.7
55* Add ` --coverage-path ` and ` --branch-coverage ` options to ` dart test ` .
6+ * Serve dart2wasm source map files.
67
78## 1.26.3
89
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ class Dart2WasmSupport extends CompilerSupport with WasmHtmlWrapper {
134134 var baseUrl =
135135 '${p .toUri (p .relative (dartPath , from : _root )).path }.browser_test.dart' ;
136136 var wasmUrl = '$baseUrl .wasm' ;
137+ var sourceMapUrl = '$wasmUrl .map' ;
137138 var jsRuntimeWrapperUrl = '$baseUrl .js' ;
138139 var jsRuntimeUrl = '$baseUrl .mjs' ;
139140 var htmlUrl = '$baseUrl .html' ;
@@ -186,6 +187,14 @@ class Dart2WasmSupport extends CompilerSupport with WasmHtmlWrapper {
186187 headers: {'Content-Type' : 'text/html' },
187188 );
188189 });
190+
191+ var sourceMapPath = '$wasmPath .map' ;
192+ _pathHandler.add (sourceMapUrl, (request) {
193+ return shelf.Response .ok (
194+ File (sourceMapPath).readAsBytesSync (),
195+ headers: {'Content-Type' : 'application/json' },
196+ );
197+ });
189198 });
190199 }
191200
You can’t perform that action at this time.
0 commit comments