espub: jsx transform doesn't work
We are building with the latest version.
The jsx syntax in the tsx file is expressed as it is without being built.
Is there no way?
// index.mjs
const buttonContent = <span>{children || ""}</span>;
The expected expression is:
const buttonContent = React.createElement("span", null, children || "");
Both cjs and mjs are the same.
jsx syntax doesn’t compile.
// tsconfig
{
compilerOptions: {
jsx: "react" // not working
jsx: "react-jsx" // compile with jsx function
}
}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (11 by maintainers)
Commits related to this issue
- Fix jsx transform to work with additional options Fixes #61 — committed to cometkim/espub by cometkim 2 years ago
- Fix jsx transform to work with additional options (#62) Fixes #61 — committed to cometkim/espub by cometkim 2 years ago
Oh it works fine.
The compilation result is good.
I will publish it as rc.13 soon
Ah my fault, compiles are belong to
distI seeYeah, it’s caused by upstream 😅
I’ve already submitted PR to fix that https://github.com/dominikg/tsconfck/pull/73
rc 12 is exist in
@rcchanneltry
this has fixed in rc.12