Fix PathHoister error attaching after export declarations.
Fixes #5369.
See also 4ee385e96c/packages/babel-plugin-transform-class-properties/src/index.js (L167)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
render() {
|
||||
return <B />
|
||||
}
|
||||
}
|
||||
|
||||
export default class B {}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
render() {
|
||||
return _ref;
|
||||
}
|
||||
}
|
||||
|
||||
export default class B {}
|
||||
|
||||
var _ref = React.createElement(B, null);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"transform-react-jsx",
|
||||
"transform-react-constant-elements"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
render() {
|
||||
return <B />
|
||||
}
|
||||
}
|
||||
|
||||
export class B {}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
render() {
|
||||
return _ref;
|
||||
}
|
||||
}
|
||||
|
||||
export class B {}
|
||||
|
||||
var _ref = React.createElement(B, null);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"transform-react-jsx",
|
||||
"transform-react-constant-elements"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user