this object can't resolve JSXElement ?
qian1994 opened this issue · comments
Motivation
Describe cases that motivate the implementation of the expected behavior.
Expected behavior
Describe how the feature should work.
Actual behavior
Describe the actual behavior of the feature or remove this section if the feature has not been implemented yet.
Perhaps this could help: https://github.com/Qard/astring-jsx
@davidbonnet Would you be interested in me upstreaming JSX support to you?
@wooorm Through a custom generator?
Yeah it makes sense to not have it in core, but it's also used frequently enough that users might want to opt in, and maintaining it with the rest may be worthwhile
Feel free to start a PR. If the JSX-specific part is tree-shakeable, it should be fine (actually, I should make sure that this is the case for source-map support, which isn't always used).
Otherwise, we could monorepo this and, e.g., publish astring
and @astring/jsx
.
If the JSX-specific part is tree-shakeable, it should be fine (actually, I should make sure that this is the case for source-map support, which isn't always used).
You’re solving this for SourceMap by having folks pass it in though, right? Or were you thinking of something else?
My plan for JSX handlers was a similar approach.