-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing support for jsx
option
#261
Comments
What's your use case? do you want to use other rollup plugins to handle JSX? |
Yes, pretty much. In projects which use the https://github.com/solidjs/solid framework, they require a babel preset to convert JSX into solid specific runtime calls. Solid leverages the JSX ecosystem rather than implementing their own component DSL. For TypeScript support in these projects it's currently required to use {
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js"
}
} With the |
Will add it soon 👌🏻
…On Sat, May 29, 2021 at 6:43 AM Max Milton ***@***.***> wrote:
Yes, pretty much.
In projects which use the https://github.com/solidjs/solid framework,
they require a babel preset
<https://github.com/solidjs/solid/tree/main/packages/babel-preset-solid>
to convert JSX into solid specific runtime calls. Solid leverages the JSX
ecosystem rather than implementing their own component DSL.
For TypeScript support in these projects it's currently required to use
@babel/preset-typescript along with tsconfig.json like:
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js"
}
}
With the jsx=preserve option in rollup-plugin-esbuild, I was hoping I
could rip out @babel/preset-typescript and instead transpile TS via
rollup-plugin-esbuild first for faster build times. That way I could run
babel *only* on files which might be solid components (*.tsx).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#261 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACDAWSFQQZM62LFEAARFXKDTQAMCPANCNFSM45PCQR4Q>
.
|
🎉 This issue has been resolved in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Following up on this, the I was able to set up my build to run .tsx through |
Recently esbuild v0.12.1 introduced the
jsx=preserve
option: https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#0121.Would be great if
rollup-plugin-esbuild
would add support for passing the option through.The text was updated successfully, but these errors were encountered: