-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider jsxFrag as set when it's set to the default value (#11295)
* Consider jsxFrag as set when it's set to the default value * Test #11294
- Loading branch information
1 parent
bb6a158
commit 87b2781
Showing
7 changed files
with
27 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
3 changes: 3 additions & 0 deletions
3
...abel-plugin-transform-react-jsx/test/fixtures/regression/pragma-frag-set-default/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,3 @@ | ||
/* @jsxFrag React.Fragment */ | ||
/* @jsx h */ | ||
<>Test</>; |
5 changes: 5 additions & 0 deletions
5
...-plugin-transform-react-jsx/test/fixtures/regression/pragma-frag-set-default/options.json
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 @@ | ||
{ | ||
"plugins": [ | ||
"transform-react-jsx" | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
...bel-plugin-transform-react-jsx/test/fixtures/regression/pragma-frag-set-default/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,4 @@ | ||
/* @jsxFrag React.Fragment */ | ||
|
||
/* @jsx h */ | ||
h(React.Fragment, null, "Test"); |
2 changes: 2 additions & 0 deletions
2
packages/babel-preset-react/test/fixtures/regression/11294/input.mjs
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,2 @@ | ||
import React from 'react'; | ||
const D = <></>; |
4 changes: 4 additions & 0 deletions
4
packages/babel-preset-react/test/fixtures/regression/11294/options.json
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 @@ | ||
{ | ||
"presets": [ | ||
["react", { "pragma": "__jsx" }]] | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-react/test/fixtures/regression/11294/output.mjs
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'; | ||
|
||
const D = __jsx(React.Fragment, null); |