We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f071df commit 5fb190cCopy full SHA for 5fb190c
compiler/jsoo/jsoo_playground_main.ml
@@ -674,9 +674,14 @@ module Export = struct
674
end
675
676
let () =
677
- Js.export "rescript_compiler"
678
- (object%js
679
- val api_version = api_version
680
- val version = Bs_version.version
681
- method make = Export.make ()
682
- end)
+ let compiler =
+ object%js
+ val api_version = api_version
+ val version = Bs_version.version
+ method make = Export.make ()
+ end
683
+ in
684
+ Js.export "rescript_compiler" compiler;
685
+
686
+ (* Prefer module export, but keep global variable for playground compatibility *)
687
+ Js.Unsafe.set Js.Unsafe.global "rescript_compiler" compiler
0 commit comments