Can we support JSX annotations?
Input
// @jsx h
<div />
Output
h('div') // Expected
React.createElement('div') // Actual
I am using esbuild in a build tool, that's why I need it.
The way to do this is to pass the --jsx-factory=h
flag to esbuild or, if you're using the API, enable the jsxFactory: 'h'
option. See also the Using with React section in the readme.
This is now supported as of version 0.6.3.
That's great, Thanks
Most helpful comment
The way to do this is to pass the
--jsx-factory=h
flag to esbuild or, if you're using the API, enable thejsxFactory: 'h'
option. See also the Using with React section in the readme.