-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/resolver): Skip property in JSX member (#8598)
**Related issue:** - Close #8528
- Loading branch information
1 parent
52b821a
commit d480ab9
Showing
6 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"jsc": { | ||
"parser": { | ||
"decorators": true, | ||
"syntax": "typescript" | ||
}, | ||
"transform": { | ||
"decoratorVersion": "2022-03" | ||
}, | ||
"externalHelpers": true, | ||
"experimental": { | ||
"plugins": [ | ||
[ | ||
"@swc/plugin-styled-components", | ||
{ | ||
"displayName": true, | ||
"ssr": true | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"env": { | ||
"targets": "> 1%, not dead" | ||
} | ||
} |
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 { observer } from "mobx"; | ||
import * as React from "react"; | ||
import * as S from "./BetButton.styled"; | ||
|
||
@observer | ||
class BetButtonWrapper extends React.Component { | ||
render() { | ||
return <S.BetButtonWrapper />; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
crates/swc/tests/fixture/issues-8xxx/8528/output/index.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,15 @@ | ||
import { _ as _apply_decs_2203_r } from "@swc/helpers/_/_apply_decs_2203_r"; | ||
var _initClass, _React_Component; | ||
import { observer } from "mobx"; | ||
import * as React from "react"; | ||
import * as S from "./BetButton.styled"; | ||
let _BetButtonWrapper; | ||
class BetButtonWrapper extends (_React_Component = React.Component) { | ||
static #_ = { c: [_BetButtonWrapper, _initClass] } = _apply_decs_2203_r(this, [], [ | ||
observer | ||
], _React_Component); | ||
render() { | ||
return /*#__PURE__*/ React.createElement(S.BetButtonWrapper, null); | ||
} | ||
static #_2 = _initClass(); | ||
} |
4 changes: 4 additions & 0 deletions
4
crates/swc_ecma_transforms_base/tests/resolver/issue-8528/input.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,4 @@ | ||
let A; | ||
|
||
B.A; | ||
<C.A />; |
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_transforms_base/tests/resolver/issue-8528/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,3 @@ | ||
let A__2; | ||
B.A; | ||
<C.A/>; |
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