Skip to content

Commit 5be29e7

Browse files
authored
Fix jsx mode being ignored when set via @@jsxConfig (#5928)
1 parent 92c23e8 commit 5be29e7

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276194,7 +276194,8 @@ let getJsxConfigByKey ~key ~type_ recordFields =
276194276194
Some value
276195276195
| ( String,
276196276196
{txt = Lident k},
276197-
{pexp_desc = Pexp_constant (Pconst_string (value, None))} )
276197+
(* accept both normal strings and "js" strings *)
276198+
{pexp_desc = Pexp_constant (Pconst_string (value, _))} )
276198276199
when k = key ->
276199276200
Some value
276200276201
| _ -> None)

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276194,7 +276194,8 @@ let getJsxConfigByKey ~key ~type_ recordFields =
276194276194
Some value
276195276195
| ( String,
276196276196
{txt = Lident k},
276197-
{pexp_desc = Pexp_constant (Pconst_string (value, None))} )
276197+
(* accept both normal strings and "js" strings *)
276198+
{pexp_desc = Pexp_constant (Pconst_string (value, _))} )
276198276199
when k = key ->
276199276200
Some value
276200276201
| _ -> None)

lib/4.06.1/whole_compiler.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286578,7 +286578,8 @@ let getJsxConfigByKey ~key ~type_ recordFields =
286578286578
Some value
286579286579
| ( String,
286580286580
{txt = Lident k},
286581-
{pexp_desc = Pexp_constant (Pconst_string (value, None))} )
286581+
(* accept both normal strings and "js" strings *)
286582+
{pexp_desc = Pexp_constant (Pconst_string (value, _))} )
286582286583
when k = key ->
286583286584
Some value
286584286585
| _ -> None)

syntax

0 commit comments

Comments
 (0)