浏览代码

[js] prefix every path in source maps with file:/// (#10217)

Aleksandr Kuzmenko 4 年之前
父节点
当前提交
b1b059b848
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/generators/genjs.ml

+ 2 - 2
src/generators/genjs.ml

@@ -287,9 +287,9 @@ let write_mappings ctx smap =
 	output_string channel "{\n";
 	output_string channel "\"version\":3,\n";
 	output_string channel ("\"file\":\"" ^ (String.concat "\\\\" (ExtString.String.nsplit basefile "\\")) ^ "\",\n");
-	output_string channel ("\"sourceRoot\":\"file:///\",\n");
+	output_string channel ("\"sourceRoot\":\"\",\n");
 	output_string channel ("\"sources\":[" ^
-		(String.concat "," (List.map (fun s -> "\"" ^ to_url s ^ "\"") sources)) ^
+		(String.concat "," (List.map (fun s -> "\"file:///" ^ to_url s ^ "\"") sources)) ^
 		"],\n");
 	if Common.defined ctx.com Define.SourceMapContent then begin
 		output_string channel ("\"sourcesContent\":[" ^