@@ -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 ()
@@ -893,59 +896,56 @@ module Export = struct
893896 ( " setJsxPreserveMode" ,
894897 inject
895898 @@ Js. wrap_meth_callback (fun _ value ->
896- Js. bool (set_jsx_preserve_mode (Js. to_bool value))) );
899+ Js. bool (set_jsx_preserve_mode (Js. to_bool value))) );
897900 ( " setGentypeEnabled" ,
898901 inject
899902 @@ Js. wrap_meth_callback (fun _ value ->
900- Js. bool (set_gentype_enabled (Js. to_bool value))) );
903+ Js. bool (set_gentype_enabled (Js. to_bool value))) );
901904 ( " setSourceMapMode" ,
902905 inject
903906 @@ Js. wrap_meth_callback (fun _ value ->
904- Js. bool (set_source_map_mode (Js. to_string value))) );
907+ Js. bool (set_source_map_mode (Js. to_string value))) );
905908 ( " setSourceMapSourcesContent" ,
906909 inject
907910 @@ Js. wrap_meth_callback (fun _ value ->
908- Js. bool
909- (set_source_map_sources_content (Js. to_bool value))) );
911+ Js. bool (set_source_map_sources_content (Js. to_bool value))) );
910912 ( " setSourceMapRoot" ,
911913 inject
912914 @@ Js. wrap_meth_callback (fun _ value ->
913- Js. bool (set_source_map_root (Js. to_string value))) );
915+ Js. bool (set_source_map_root (Js. to_string value))) );
914916 ( " getConfig" ,
915917 inject
916918 @@ Js. wrap_meth_callback (fun _ ->
917- Js.Unsafe. (
918- obj
919- [|
920- ( " module_system" ,
921- inject
922- @@ (config.module_system
923- |> Bundle_config. string_of_module_system
924- |> Js. string ) );
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- );
935- ( " source_map_sources_content" ,
936- inject
937- @@ (config.source_map_sources_content |> Js. bool ) );
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- );
948- |])) );
919+ Js.Unsafe. (
920+ obj
921+ [|
922+ ( " module_system" ,
923+ inject
924+ @@ (config.module_system
925+ |> Bundle_config. string_of_module_system |> Js. string
926+ ) );
927+ (" warn_flags" , inject @@ Js. string config.warn_flags);
928+ ( " jsx_preserve_mode" ,
929+ inject @@ (config.jsx_preserve_mode |> Js. bool ) );
930+ ( " gentype_enabled" ,
931+ inject @@ (config.gentype_enabled |> Js. bool ) );
932+ ( " source_map_mode" ,
933+ inject
934+ @@ (config.source_map_mode
935+ |> Bundle_config. string_of_source_map |> Js. string ) );
936+ ( " source_map_sources_content" ,
937+ inject @@ (config.source_map_sources_content |> Js. bool )
938+ );
939+ ( " source_map_root" ,
940+ inject @@ Js. string config.source_map_root );
941+ ( " experimental_features" ,
942+ inject
943+ @@ (config.experimental_features |> Array. of_list
944+ |> Js. array ) );
945+ ( " open_modules" ,
946+ inject
947+ @@ (config.open_modules |> Array. of_list |> Js. array ) );
948+ |])) );
949949 |])
950950end
951951
0 commit comments