question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing support for `jsx` option

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
egoistcommented, May 29, 2021

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 https://github.com/egoist/rollup-plugin-esbuild/issues/261#issuecomment-850708091, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDAWSFQQZM62LFEAARFXKDTQAMCPANCNFSM45PCQR4Q .

1reaction
github-actions[bot]commented, Jun 2, 2021

🎉 This issue has been resolved in version 4.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot use JSX unless the '--jsx' flag is provided
Every time I run npm start , it overrides whatever I configure in {jsx: ...} with react-jsx in order to be compatible with...
Read more >
Support for the Experimental Syntax 'Jsx' Isn't Currently Enabled
Support for the experimental syntax 'jsx' isn't currently enabled is an error that occurs when there is an issue with Babel configuration in...
Read more >
Error when opening TSX file: Cannot use JSX unless ... - GitHub
Well I worked around it by adding "jsx": "react" to tsconfig.json , as far as I can tell, but that is missing the...
Read more >
Documentation - JSX - TypeScript
TypeScript supports embedding, type checking, and compiling JSX directly to JavaScript. Basic usage. In order to use JSX you must do two things....
Read more >
Javascript / Typescript editor missing in Options > Text Editor ...
I am trying to follow multiple issues to enable JSX syntax highlighting but I hit the wall I cannot google my self out...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found