Skip to content

Commit 019cfde

Browse files
committed
Restore inheriting jsx flags when not in v3 compatibility mode.
1 parent 56e2629 commit 019cfde

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

jscomp/bsb/bsb_config_parse.ml

+8-8
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,16 @@ let interpret_json ~(package_kind : Bsb_package_kind.t) ~(per_proj_dir : string)
298298
(* ~namespace *)
299299
sources
300300
in
301+
let bsc_flags = extract_string_list map Bsb_build_schemas.bsc_flags in
302+
let jsx = Bsb_jsx.from_map map in
301303
let jsx, bsc_flags =
302304
match package_kind with
303-
| (Pinned_dependency x | Dependency x)
304-
when List.mem package_name x.jsx.v3_dependencies ->
305-
( { (Bsb_jsx.from_map map) with version = Some Jsx_v3 },
306-
"-open ReactV3"
307-
:: extract_string_list map Bsb_build_schemas.bsc_flags )
308-
| _ ->
309-
( Bsb_jsx.from_map map,
310-
extract_string_list map Bsb_build_schemas.bsc_flags )
305+
| Pinned_dependency x | Dependency x ->
306+
if List.mem package_name x.jsx.v3_dependencies then
307+
( { jsx with version = Some Jsx_v3 },
308+
"-open ReactV3" :: bsc_flags )
309+
else (x.jsx, bsc_flags)
310+
| _ -> (jsx, bsc_flags)
311311
in
312312
{
313313
pinned_dependencies;

lib/4.06.1/rescript.ml

+8-8
Original file line numberDiff line numberDiff line change
@@ -10593,16 +10593,16 @@ let interpret_json ~(package_kind : Bsb_package_kind.t) ~(per_proj_dir : string)
1059310593
(* ~namespace *)
1059410594
sources
1059510595
in
10596+
let bsc_flags = extract_string_list map Bsb_build_schemas.bsc_flags in
10597+
let jsx = Bsb_jsx.from_map map in
1059610598
let jsx, bsc_flags =
1059710599
match package_kind with
10598-
| (Pinned_dependency x | Dependency x)
10599-
when List.mem package_name x.jsx.v3_dependencies ->
10600-
( { (Bsb_jsx.from_map map) with version = Some Jsx_v3 },
10601-
"-open ReactV3"
10602-
:: extract_string_list map Bsb_build_schemas.bsc_flags )
10603-
| _ ->
10604-
( Bsb_jsx.from_map map,
10605-
extract_string_list map Bsb_build_schemas.bsc_flags )
10600+
| Pinned_dependency x | Dependency x ->
10601+
if List.mem package_name x.jsx.v3_dependencies then
10602+
( { jsx with version = Some Jsx_v3 },
10603+
"-open ReactV3" :: bsc_flags )
10604+
else (x.jsx, bsc_flags)
10605+
| _ -> (jsx, bsc_flags)
1060610606
in
1060710607
{
1060810608
pinned_dependencies;

0 commit comments

Comments
 (0)