-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for "react-jsx" and jsxImportSource #139
Conversation
@@ -0,0 +1,107 @@ | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the snapshot tests instead so that you don't have to setup output fixtures nor repeat the logic that calls transpile
. It will also cover bundle
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundle doesn't seem to work with react-jsx
and react-jsxdev
.
It throws an error (Error: Unable to output during bundling
).
This can be avoided by explicitly declaring the import source with /** @jsxImportSource https://esm.sh/react@17.0.2 */
in the input file.
Apparently, this issue has already been fixed for deno bundle
(denoland/deno#13389).
Does this have to be implemented again for deno_emit
?
Thanks! Landed this in #161 with attribution. |
(See #10)
This exposes the
jsxImportSource
compiler option and allows thejsx
option to be"preserve" | "react-jsx" | "react-jsxdev" | "react-native" | "react"