@@ -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 ()
@@ -891,59 +894,56 @@ module Export = struct
891894 ( " setJsxPreserveMode" ,
892895 inject
893896 @@ Js. wrap_meth_callback (fun _ value ->
894- Js. bool (set_jsx_preserve_mode (Js. to_bool value))) );
897+ Js. bool (set_jsx_preserve_mode (Js. to_bool value))) );
895898 ( " setGentypeEnabled" ,
896899 inject
897900 @@ Js. wrap_meth_callback (fun _ value ->
898- Js. bool (set_gentype_enabled (Js. to_bool value))) );
901+ Js. bool (set_gentype_enabled (Js. to_bool value))) );
899902 ( " setSourceMapMode" ,
900903 inject
901904 @@ Js. wrap_meth_callback (fun _ value ->
902- Js. bool (set_source_map_mode (Js. to_string value))) );
905+ Js. bool (set_source_map_mode (Js. to_string value))) );
903906 ( " setSourceMapSourcesContent" ,
904907 inject
905908 @@ Js. wrap_meth_callback (fun _ value ->
906- Js. bool
907- (set_source_map_sources_content (Js. to_bool value))) );
909+ Js. bool (set_source_map_sources_content (Js. to_bool value))) );
908910 ( " setSourceMapRoot" ,
909911 inject
910912 @@ Js. wrap_meth_callback (fun _ value ->
911- Js. bool (set_source_map_root (Js. to_string value))) );
913+ Js. bool (set_source_map_root (Js. to_string value))) );
912914 ( " getConfig" ,
913915 inject
914916 @@ Js. wrap_meth_callback (fun _ ->
915- Js.Unsafe. (
916- obj
917- [|
918- ( " module_system" ,
919- inject
920- @@ (config.module_system
921- |> Bundle_config. string_of_module_system
922- |> Js. string ) );
923- (" warn_flags" , inject @@ Js. string config.warn_flags);
924- ( " jsx_preserve_mode" ,
925- inject @@ (config.jsx_preserve_mode |> Js. bool ) );
926- ( " gentype_enabled" ,
927- inject @@ (config.gentype_enabled |> Js. bool ) );
928- ( " source_map_mode" ,
929- inject
930- @@ (config.source_map_mode
931- |> Bundle_config. string_of_source_map |> Js. string )
932- );
933- ( " source_map_sources_content" ,
934- inject
935- @@ (config.source_map_sources_content |> Js. bool ) );
936- ( " source_map_root" ,
937- inject @@ Js. string config.source_map_root );
938- ( " experimental_features" ,
939- inject
940- @@ (config.experimental_features |> Array. of_list
941- |> Js. array ) );
942- ( " open_modules" ,
943- inject
944- @@ (config.open_modules |> Array. of_list |> Js. array )
945- );
946- |])) );
917+ Js.Unsafe. (
918+ obj
919+ [|
920+ ( " module_system" ,
921+ inject
922+ @@ (config.module_system
923+ |> Bundle_config. string_of_module_system |> Js. string
924+ ) );
925+ (" warn_flags" , inject @@ Js. string config.warn_flags);
926+ ( " jsx_preserve_mode" ,
927+ inject @@ (config.jsx_preserve_mode |> Js. bool ) );
928+ ( " gentype_enabled" ,
929+ inject @@ (config.gentype_enabled |> Js. bool ) );
930+ ( " source_map_mode" ,
931+ inject
932+ @@ (config.source_map_mode
933+ |> Bundle_config. string_of_source_map |> Js. string ) );
934+ ( " source_map_sources_content" ,
935+ inject @@ (config.source_map_sources_content |> Js. bool )
936+ );
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+ |])) );
947947 |])
948948end
949949
0 commit comments