Skip to content

Commit e32dfb5

Browse files
committed
add project root to default config
1 parent b712db0 commit e32dfb5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

jscomp/gentype/GenTypeConfig.ml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ let readConfig ~getConfigFile ~namespace =
234234
sources;
235235
}
236236
in
237+
let defaultConfig = {default with projectRoot; bsbProjectRoot} in
237238
match getConfigFile ~projectRoot with
238239
| Some bsConfigFile -> (
239240
try
@@ -242,7 +243,7 @@ let readConfig ~getConfigFile ~namespace =
242243
| Obj {map = bsconf} -> (
243244
match bsconf |> getOpt "gentypeconfig" with
244245
| Some (Obj {map = gtconf}) -> parseConfig ~bsconf ~gtconf
245-
| _ -> default)
246-
| _ -> default
247-
with _ -> default)
248-
| None -> default
246+
| _ -> defaultConfig)
247+
| _ -> defaultConfig
248+
with _ -> defaultConfig)
249+
| None -> defaultConfig

0 commit comments

Comments
 (0)