Skip to content

Commit 18c14c7

Browse files
committed
add repro where direct component function doesn't get exported
1 parent a6a5dd1 commit 18c14c7

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/build_tests/rsc_nested_jsx_deep/input.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ assert.match(
3030
/export \{[\s\S]*Group,[\s\S]*Sidebar\$Group,[\s\S]*Sidebar\$Group\$jsx[\s\S]*\}/s,
3131
);
3232

33+
const brandIcons = await import("./src/BrandIcons.res.js");
34+
assert.match(Object.keys(brandIcons).join(", "), /ReScript, BrandIcons\$ReScript, BrandIcons\$ReScript\$jsx, getIconForLanguageExtension/);
35+
3336
await execClean();
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module ReScript = {
2+
@react.component
3+
let make = () => React.null
4+
}
5+
6+
7+
let getIconForLanguageExtension = (language: string) => {
8+
switch language {
9+
| "res" | "rescript" => <ReScript />
10+
| _ => React.null
11+
}
12+
}

0 commit comments

Comments
 (0)