@@ -539,6 +539,7 @@ module Compile = struct
539539 platform_lib = " rescript" ;
540540 project_root;
541541 bsb_project_root = project_root;
542+ suffix = Literals. suffix_js;
542543 }
543544 in
544545 let source_file = sourcefile in
@@ -557,7 +558,7 @@ module Compile = struct
557558 |> Emit_js. emit_translation_as_string ~config ~file_name
558559 ~output_file_relative ~resolver
559560 ~input_cmt_translate_type_declarations:
560- Gentype_main. input_cmt_translate_type_declarations
561+ Gentype_main. input_cmt_translate_type_declarations
561562 in
562563 Emit_type. file_header ~source_file: (Filename. basename source_file)
563564 ^ " \n " ^ code_text ^ " \n "
@@ -576,13 +577,15 @@ module Compile = struct
576577 | Js_config. No_source_map -> None
577578 | Linked | Inline | Hidden ->
578579 Some
579- (Js_source_map. make ~source_contents: [(filename, source)] ~generated_file
580- ~source_root: source_map_root
580+ (Js_source_map. make
581+ ~source_contents: [(filename, source)]
582+ ~generated_file ~source_root: source_map_root
581583 ~sources_content: source_map_sources_content)
582584 in
583585 let print_javascript () =
584586 Js_dump_program. pp_deps_program ~output_prefix: " " module_system
585- lambda_output (Ext_pp. from_buffer buffer)
587+ lambda_output
588+ (Ext_pp. from_buffer buffer)
586589 in
587590 (match source_map_builder with
588591 | None -> print_javascript ()
@@ -892,59 +895,56 @@ module Export = struct
892895 ( " setJsxPreserveMode" ,
893896 inject
894897 @@ Js. wrap_meth_callback (fun _ value ->
895- Js. bool (set_jsx_preserve_mode (Js. to_bool value))) );
898+ Js. bool (set_jsx_preserve_mode (Js. to_bool value))) );
896899 ( " setGentypeEnabled" ,
897900 inject
898901 @@ Js. wrap_meth_callback (fun _ value ->
899- Js. bool (set_gentype_enabled (Js. to_bool value))) );
902+ Js. bool (set_gentype_enabled (Js. to_bool value))) );
900903 ( " setSourceMapMode" ,
901904 inject
902905 @@ Js. wrap_meth_callback (fun _ value ->
903- Js. bool (set_source_map_mode (Js. to_string value))) );
906+ Js. bool (set_source_map_mode (Js. to_string value))) );
904907 ( " setSourceMapSourcesContent" ,
905908 inject
906909 @@ Js. wrap_meth_callback (fun _ value ->
907- Js. bool
908- (set_source_map_sources_content (Js. to_bool value))) );
910+ Js. bool (set_source_map_sources_content (Js. to_bool value))) );
909911 ( " setSourceMapRoot" ,
910912 inject
911913 @@ Js. wrap_meth_callback (fun _ value ->
912- Js. bool (set_source_map_root (Js. to_string value))) );
914+ Js. bool (set_source_map_root (Js. to_string value))) );
913915 ( " getConfig" ,
914916 inject
915917 @@ Js. wrap_meth_callback (fun _ ->
916- Js.Unsafe. (
917- obj
918- [|
919- ( " module_system" ,
920- inject
921- @@ (config.module_system
922- |> Bundle_config. string_of_module_system
923- |> Js. string ) );
924- (" warn_flags" , inject @@ Js. string config.warn_flags);
925- ( " jsx_preserve_mode" ,
926- inject @@ (config.jsx_preserve_mode |> Js. bool ) );
927- ( " gentype_enabled" ,
928- inject @@ (config.gentype_enabled |> Js. bool ) );
929- ( " source_map_mode" ,
930- inject
931- @@ (config.source_map_mode
932- |> Bundle_config. string_of_source_map |> Js. string )
933- );
934- ( " source_map_sources_content" ,
935- inject
936- @@ (config.source_map_sources_content |> Js. bool ) );
937- ( " source_map_root" ,
938- inject @@ Js. string config.source_map_root );
939- ( " experimental_features" ,
940- inject
941- @@ (config.experimental_features |> Array. of_list
942- |> Js. array ) );
943- ( " open_modules" ,
944- inject
945- @@ (config.open_modules |> Array. of_list |> Js. array )
946- );
947- |])) );
918+ Js.Unsafe. (
919+ obj
920+ [|
921+ ( " module_system" ,
922+ inject
923+ @@ (config.module_system
924+ |> Bundle_config. string_of_module_system |> Js. string
925+ ) );
926+ (" warn_flags" , inject @@ Js. string config.warn_flags);
927+ ( " jsx_preserve_mode" ,
928+ inject @@ (config.jsx_preserve_mode |> Js. bool ) );
929+ ( " gentype_enabled" ,
930+ inject @@ (config.gentype_enabled |> Js. bool ) );
931+ ( " source_map_mode" ,
932+ inject
933+ @@ (config.source_map_mode
934+ |> Bundle_config. string_of_source_map |> Js. string ) );
935+ ( " source_map_sources_content" ,
936+ inject @@ (config.source_map_sources_content |> Js. bool )
937+ );
938+ ( " source_map_root" ,
939+ inject @@ Js. string config.source_map_root );
940+ ( " experimental_features" ,
941+ inject
942+ @@ (config.experimental_features |> Array. of_list
943+ |> Js. array ) );
944+ ( " open_modules" ,
945+ inject
946+ @@ (config.open_modules |> Array. of_list |> Js. array ) );
947+ |])) );
948948 |])
949949end
950950
0 commit comments