-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scope hoisting renaming after babel transforms (#2292)
- Loading branch information
1 parent
4773d65
commit 0937705
Showing
8 changed files
with
53 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
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
3 changes: 3 additions & 0 deletions
3
packages/core/parcel-bundler/test/integration/scope-hoisting/es6/jsx-pragma/.babelrc
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 @@ | ||
{ | ||
"plugins": ["@babel/plugin-transform-react-jsx"] | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/core/parcel-bundler/test/integration/scope-hoisting/es6/jsx-pragma/a.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 @@ | ||
import React from "./react.js"; | ||
|
||
output = <span>Test</span>; |
9 changes: 9 additions & 0 deletions
9
packages/core/parcel-bundler/test/integration/scope-hoisting/es6/jsx-pragma/react.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,9 @@ | ||
// mock for React.createElement | ||
|
||
export default { | ||
createElement(type, props, children){ | ||
return { | ||
type, props, children | ||
}; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/core/parcel-bundler/test/integration/scope-hoisting/es6/rename-superclass/a.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,5 @@ | ||
import Superclass from './b'; | ||
|
||
class Test extends Superclass {} | ||
|
||
output = new Test().parentMethod(); |
5 changes: 5 additions & 0 deletions
5
packages/core/parcel-bundler/test/integration/scope-hoisting/es6/rename-superclass/b.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,5 @@ | ||
export default class Superclass { | ||
parentMethod(){ | ||
return 2; | ||
} | ||
} |
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