|
@@ -1738,7 +1738,7 @@ let generate com =
|
|
|
|
|
|
let var_exports = (
|
|
let var_exports = (
|
|
"_hx_exports",
|
|
"_hx_exports",
|
|
- "_G"
|
|
|
|
|
|
+ "_hx_exports or {}"
|
|
) in
|
|
) in
|
|
|
|
|
|
let exposed = List.concat (List.map (fun t ->
|
|
let exposed = List.concat (List.map (fun t ->
|
|
@@ -1861,7 +1861,7 @@ let generate com =
|
|
| None -> ()
|
|
| None -> ()
|
|
| Some e -> gen_expr ctx e; newline ctx);
|
|
| Some e -> gen_expr ctx e; newline ctx);
|
|
|
|
|
|
- sprln ctx "return _G";
|
|
|
|
|
|
+ sprln ctx "return _hx_exports";
|
|
|
|
|
|
let ch = open_out_bin com.file in
|
|
let ch = open_out_bin com.file in
|
|
output_string ch (Buffer.contents ctx.buf);
|
|
output_string ch (Buffer.contents ctx.buf);
|