@@ -105,6 +105,26 @@ let set_debug ~gtconf =
105
105
let compiler_config_file = " rescript.json"
106
106
let legacy_compiler_config_file = " bsconfig.json"
107
107
108
+ let default_config ~project_root ~bsb_project_root =
109
+ {
110
+ project_root;
111
+ bsb_project_root;
112
+ bs_dependencies = default.bs_dependencies;
113
+ suffix = default.suffix;
114
+ emit_import_curry = default.emit_import_curry;
115
+ emit_import_react = default.emit_import_react;
116
+ emit_type_prop_done = default.emit_type_prop_done;
117
+ everything = default.everything;
118
+ export_interfaces = default.export_interfaces;
119
+ generated_file_extension = default.generated_file_extension;
120
+ module_ = default.module_;
121
+ module_resolution = default.module_resolution;
122
+ namespace = default.namespace;
123
+ platform_lib = default.platform_lib;
124
+ shims_map = default.shims_map;
125
+ sources = default.sources;
126
+ }
127
+
108
128
let rec find_project_root ~dir =
109
129
if
110
130
Sys. file_exists (Filename. concat dir compiler_config_file)
@@ -247,7 +267,7 @@ let read_config ~get_config_file ~namespace =
247
267
| Obj {map = bsconf } -> (
248
268
match bsconf |> get_opt " gentypeconfig" with
249
269
| Some (Obj {map = gtconf } ) -> parse_config ~bsconf ~gtconf
250
- | _ -> default )
251
- | _ -> default
252
- with _ -> default )
253
- | None -> default
270
+ | _ -> default_config ~project_root ~bsb_project_root )
271
+ | _ -> default_config ~project_root ~bsb_project_root
272
+ with _ -> default_config ~project_root ~bsb_project_root )
273
+ | None -> default_config ~project_root ~bsb_project_root
0 commit comments