Run ReScript in dev mode:
npm run dev
You can switch between the working and broken version by changing rescript.json
.
// working
"jsx": {
"version": 4,
"module": "JSXWorking"
}
// broken
"jsx": {
"version": 4,
"module": "JSXBroken"
}
The only differences between the working version and the broken version are the missing @module("dummy")
lines.
But in one case the output contains JSX as expected, in the other case, the output contains only function calls.
Even in the working version, fragments are compiled to <Fragement>...</Fragment>
but it should be <>...</>
.
When removing the "module": "JSXWorking"
line completely:
"jsx": {
"version": 4,
}
fragments are generated as expected.