Skip to content

Commit

Permalink
Actually set open_modules in compiler config
Browse files Browse the repository at this point in the history
  • Loading branch information
fhammerschmidt committed Oct 31, 2023
1 parent 412f86c commit b268ff4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/common/CompilerManagerHook.res
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,14 @@ let useCompilerManager = (

let instance = Compiler.make()
let apiVersion = apiVersion->Version.fromString
let config = instance->Compiler.getConfig

let open_modules =
libraries->Belt.Array.some(el => el === "@rescript/core")
? Some(["RescriptCore"])
: None

let config = {...instance->Compiler.getConfig, ?open_modules}
instance->Compiler.setConfig(config)

let selected = {
id: version,
Expand Down

0 comments on commit b268ff4

Please sign in to comment.