@jsxImportSource
does not imply a module, breaking emit
#46723
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Bug Report
π Search Terms
jsxImportSource
π Version & Regression Information
β― Playground Link
Playground link with relevant code - broken
Playground link with relevant code - working
π» Code
The following code...
Will emit:
Which is broken, because there is no
_jsx
symbol being imported.But the following code:
Will change the emit to:
Where the
_jsx
symbol is being imported.π Actual behavior
When there are no imports/exports, but a
@jsxImportSource
pragma, the JSX is transformed expecting the_jsx
symbol to be imported, but the import never occurs.π Expected behavior
The a
@jsxImportSource
pragma implies that the file is a module and not a script and ensure that the emitted symbols are actually imported.The text was updated successfully, but these errors were encountered: