Skip to content

Commit 40851c8

Browse files
committed
transform module imports
1 parent b5d902b commit 40851c8

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

jscomp/frontend/bs_builtin_ppx.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,10 @@ let rec structure_mapper ~await_context (self : mapper) (stru : Ast_structure.t)
601601
{txt = safe_module_type_name; loc}
602602
~typ:(Mty.typeof_ ~loc me)))
603603
:: aux expr)
604-
| Pexp_fun (_, _, _, expr) -> aux expr
604+
| Pexp_let (_, vbs, expr) -> aux expr @ spelunk_vbs acc vbs
605+
| Pexp_ifthenelse (_, then_expr, Some else_expr) ->
606+
aux then_expr @ aux else_expr
607+
| Pexp_fun (_, _, _, expr) | Pexp_newtype (_, expr) -> aux expr
605608
| _ -> acc
606609
in
607610
aux pvb_expr @ spelunk_vbs acc tl

jscomp/test/Import.js

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)