@@ -280,6 +280,7 @@ let options =
280280 input_file
281281 js_files
282282 keep_unit_names =
283+ let inline_source_content = not sourcemap_don't_inline_content in
283284 let chop_extension s = try Filename. chop_extension s with Invalid_argument _ -> s in
284285 let runtime_files = js_files in
285286 let fs_external = fs_external || (toplevel && no_cmis) in
@@ -308,13 +309,9 @@ let options =
308309 in
309310 Some
310311 ( sm_output_file
311- , { Source_map.Standard. version = 3
312- ; file
312+ , { ( Source_map.Standard. empty ~inline_source_content ) with
313+ file
313314 ; sourceroot = sourcemap_root
314- ; sources = []
315- ; sources_content = (if sourcemap_don't_inline_content then None else Some [] )
316- ; names = []
317- ; mappings = Source_map.Mappings. empty
318315 } )
319316 else None
320317 in
@@ -519,6 +516,7 @@ let options_runtime_only =
519516 target_env
520517 output_file
521518 js_files =
519+ let inline_source_content = not sourcemap_don't_inline_content in
522520 let chop_extension s = try Filename. chop_extension s with Invalid_argument _ -> s in
523521 let runtime_files = js_files in
524522 let output_file =
@@ -537,13 +535,9 @@ let options_runtime_only =
537535 in
538536 Some
539537 ( sm_output_file
540- , { Source_map.Standard. version = 3
541- ; file
538+ , { ( Source_map.Standard. empty ~inline_source_content ) with
539+ file
542540 ; sourceroot = sourcemap_root
543- ; sources = []
544- ; sources_content = (if sourcemap_don't_inline_content then None else Some [] )
545- ; names = []
546- ; mappings = Source_map.Mappings. empty
547541 } )
548542 else None
549543 in
0 commit comments