Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/typescript): Fix handling of non-uppercase JSX elements (#6928)
**Related issue:** - Closes #6923.
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6923/input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import { _Component } from "./Component"; | ||
|
||
const App = ( | ||
<div> | ||
<_Component></_Component> | ||
<p>Hello World</p> | ||
</div> | ||
); | ||
ReactDOM.render(App, window.document.getElementById("react_root")); |
10 changes: 10 additions & 0 deletions
10
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6923/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import ReactDOM from "react-dom"; | ||
import { _Component } from "./Component"; | ||
const App = <div> | ||
|
||
<_Component></_Component> | ||
|
||
<p>Hello World</p> | ||
|
||
</div>; | ||
ReactDOM.render(App, window.document.getElementById("react_root")); |